How to create a dynamic action (copying from one infotype to another)

Tuesday, March 24, 2009 |

Scenario :


We want SAP to copy data from a newly created / existing infotype to a specific infotype automatically.


How to do it?


Transaction Code : SPRO


IMG > Personnel Management > Personnel Administration > Customizing Procedures > Dynamic Actions




Inside the dynamic action, identify which infotype that you want to maintain, for example I want to create / maintain infotype 0185 (Personal ID) subtype 02 (Passports) and during save, I want it to copy certain fields into infotype 0702 (Documents) subtype (PASS).




IType = This is where you put which infotype that you want to create / maintain.


Sty. = This where you put the subtype.


Field N = This where you can put the exact field name within the intermediate record, in my case, I don't need to.


FC = This is for the functional character of the steps.


00 for Independent of the current function carried out


02 for Change


04 for Create


06 for Change and create


08 for Delete


10 for Change and delete


12 for Create and delete


In my case, I'm using "06" because I want the dynamic to be active during creation / maintaining an infotype.


No = This is where you specify the sequence.


S = This is for Step's Indicator.


P - Check conditions


I - Maintain infotype record


W - Set default values when creating a new record


V - Reference to another step


F - Call routine


M - Send mail


In my case, I'm using "I" for maintaining an infotype and "W" to copy and paste the fields.


Variable function part = This the codes, just like programming.


INS,0702,PASS,,(P0182-BEGDA),(P0185-ENDDA)/D
*Insert infotype 0702, subtype PASS using the Begin Date and Date from infotype 0182 subtype 02


P0702-BEGDA=P0185-BEGDA
* Copy Start Date of infotype 0185 to infotype 0702


P0702-ENDDA=P0185-ENDDA
* Copy End Date of infotype 0185 to infotype 0702


P0702-DOC_COUNTRY=P0185-IDCOT
* Copy the country ID field from infotype 0185 to document country field in infotype 0702


P0702-DOC_NUMBER=P0185-DOCN1
* Copy the document numbers field in infotype 0185 to document number field in infotype 0702


P0702-ISSUE_DATE=P0185-FPDAT
* Copy the date of issue field in infotype 0185 to issue date field in infotype 0702


P0702-ISSUE_PLACE=P0185-ISSPL
* Copy the issue place of the document from infotype 0185 to infotype 0702


P0702-ISSUE_CTRY=P0185-ISCOT
* Copy the issue country of the document from infotype 0185 to infotype 0702


 

0 comments:

Post a Comment