on 09-28-2011 7:11 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hi
I am facing an issue while following the solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
108 | |
15 | |
10 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.