cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic action

Former Member
0 Kudos

Hi

I have one scenario where if an employee is booking a long leave (maternity leave), then payroll area in It0001 should chnage to XX payroll area. and on his leave's end date Again he will be assigned to the previous Payroll Area .(eg YY payroll area).

we need this scenario wherein an absence is booked (maternity leave) in It2001 , the payroll area in It0001 of the employee should chnage . and on the end date of that leave payroll area in It0001 should be the previous one.

Kindly guide.

Thanks

Seema

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Seema,

You can try the logic below: (0120 is the subtype of the long term leave)

0120 04 01 ** UPDATE 0001 WHEN 2001-0120 IS CREATED **

0120 04 02 P T001P-MOLGA='47' --- SPECIFY YOUR OWN COUNTRY GR.

0120 04 04 I INS,0001,,(P2001-BEGDA),(P2001-ENDDA)

0120 04 05 W P0001-ABKRS='XX'

(INS should be resulting the following record combination

DATE1 DATE2 PayrollAreaOriginal

DATE2+1 DATE3 XX

DATE3+1 31.12.9999 PayrollAreaOriginal) --> will insert PA XX record in between

Please refer to my WIKI space also :

http://wiki.sdn.sap.com/wiki/display/ERPHCM/HowtoCreateaDynamic+action

Regards,

Dilek

Former Member
0 Kudos

Hi Dilek

Can you please explain me how this Date1 date2 & date 3 works. The concept behind this. & also how to mention this in dynamic action.

Thanks

Seema

Former Member
0 Kudos

Seema,

Ler me explain with an example:

In PA30, let's say that you have an IT0001 record with the following values:

BEGDA ENDDA PayrollArea

01.01.2011 31.12.9999 01

If you insert an entry with the following values:

BEGDA ENDDA PayrollArea

01.03.2011 31.03.2011 XX

Then the system will insert the record in between, so you'll have three records for IT0001:

BEGDA ENDDA PayrollArea

01.01.2011 28.02.2011 01

01.03.2011 31.03.2011 XX

01.04.2011 31.12.9999 01

Dynamic action is a way of simulating PA30 transaction.

So if you insert the entry got payroll area XX with proper beginning and end date, then the system will for other two records automatically. In the following dynamic action, you only need to specify beginning and end date for payroll area XX record of IT0001 -beginning date is begda of absence record and end date is endda of absence record-. Just try the following code specifying right subtype (instead of 0120) and country grouping (instead of 47) for your case:

0120 04 01 ** UPDATE 0001 WHEN 2001-0120 IS CREATED **

0120 04 02 P T001P-MOLGA='47' --- SPECIFY YOUR OWN COUNTRY GR.

0120 04 04 I INS,0001,,(P2001-BEGDA),(P2001-ENDDA)

0120 04 05 W P0001-ABKRS='XX'

Regards,

Dilek

Former Member
0 Kudos

Thanks Dilek.

Former Member
0 Kudos

U're welcome

Former Member
0 Kudos

Dilek one more thing

It is workign but values in other fields are getting blank. So do i need to copy other field values .

Pls advice.

Thanks

Seema

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I am facing an issue while following the solution.

Former Member
0 Kudos

Hi Dilek

While using the dynamic action (as per your previous answer) its creating a record .

e.g. i have a long term absence from 10.10.2011-15.02.2013

But When i create record (leave) it triggers It0001 record but its start date is 15.12.2013. and at the same time all other fields except abkrs are blank.

Please advice.

Thanks

Seema

Former Member
0 Kudos

Seema,

Instead of INS, please try COP operation.

Regards,

Dilek

Former Member
0 Kudos

Hi Dilek

Its still not working.

Former Member
0 Kudos

Hi

It has started working now.

Thanks

Seema

Former Member
0 Kudos

Resolved