cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Action for Infotype 27 (Cost Distribution)

Former Member
0 Kudos

Hi SAP Gurus....

How to write the dynamic action for creating the Infotype 27 (Cost Distribution) in background, the value of Cost Center should be proposed automatically. As we have created a Z table which includes PA, PSA and Cost Center.

DA which I have written...

0001 06 P P0000-MASSN='ZA' (hiring action)

0001 06 P T001P-MOLGA='40'

0001 06 P ZHR_COSTCENTER-WERKS=P0001-WERKS

0001 06 P ZHR_COSTCENTER-BTRTL=P0001-BTRTL

0001 06 I INS,0027,01,,(P0001-BEGDA),(P0001-ENDDA)/D

0001 06 W RHCD_TAB-KOSTL=ZHR_COSTCENTER-KOSTL

0001 06 W RHCD_TAB-PROZT='100'

Kindly help in this.. As its very urgent...

Regards,

Vikash

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

The maintenance of dynamic actions is done via the view V_T588Z, as shown in Figure 1 (IMG menu path Personnel Management>Global Settings in Personnel Management>Basic Settings>Infotypes>Create Dynamic Actions).

Infotype Number (INFTY) 0027

Subtype (SUBTY): narrows the focus to a specific subtype

Function (FC): . They are 02 (change); 04 (create); 06 (create and change); 08 (delete); 10 (change and delete)

Sequence Number (NO): refers to a sequential number

Variable function part: The variable function part along with the step indicator forms the core part of your action. It specifies the processing details when the dynamic action is triggered

Reward Points

Former Member
0 Kudos

You need to write a routine to read the value from table ZHR_COSTCENTER. The values used for decision ZHR_COSTCENTER-WERKS will not have a value unless you populate them.

My suggestion is that you read the table inside a routine and then pass the value back in structure fields viz RP50D for taking necessary decision. You can also do the logic inside the routine and pass the cost centre value back with structure RP50D.

Reward if this is helpful

Regards

Former Member
0 Kudos

Hi Ravi,

I will check and revert back..

One more query...

how can i update the cost center in IT0027 when the cost center in table ZHR_COSTCENTER will change for the existing PA and PSA.

Thanks!!!

Former Member
0 Kudos

Are you getting any error while running the DA?