Simple way of writing a PCR
Scenario: Overtime Calculation
Employee’s overtime, which is entered in employee remuneration info should be paid correctly in his payroll.
OT Rate has to be calculated as per the below logic.
OT Rate = (Basic * 12) / 2496.
Using standard schema, we cannot achieve this.
We will create a custom rule and add that rule in custom schema.
Copying Standard Schema:
TCODE: PE01.
Enter Schema name and click on Copy button. Enter TO Schema.
Copy SAP Standard Schema (XT00) to Z Schema (Z003).
Rule Creation:
TCODE: PE02.
Enter Rule name and click on Create button. In Attributes, enter Program Class ‘C’ (Payroll).
Create a Rule (Z002) for calculating OT Rate.
Each rule contains operations to process payroll data in internal tables. In the below rule we have used AMT, ADDWT and FILLF operations.
AMT*12: Amount of the current wagetype is multiplied with 12.
ADDWT 9010: The Current wagetype values are added to wagetype 9010 into OT table.
FILLF: This will reset the value of current wagetype.
ADDWT *: Adding current wagetype to OT table.
Create another rule(Z004) to send amount of wagetype 9010 to wagetype 9020.
Create a rule(Z005) to multiply Rate with Number to get Amount.
Insert the newly created rules into schema Z003.
Data Maintenance:
Now enter wagetype 9020(Overtime) and number of hours in Employee Remuneration Info (2011) infotype.
Hi Pradeep,
Keep up the good work. This is an amazing document. However the screenshots are not clear. Is there any way you could update the same??
Regards,
Binu
Hi Binu,
You can click on the screen shots then they will pop up in larger image and will be clear.
Regards
Upen
Hi Upendra,
I have tried several methods to chk the screen shot, the issue is, the moment u enlarge the size, the content gets blurred and become unreadable.
Was hoping to read the functions used in the rule...
Hi Binu,
Then I would not be of any help here, because I have suggested what I have done, may be it is something with your OS, I am not sure.
HI wen clik on scren shots they are not opening ..........
Hi,
i done according to document stepwise only
but if i give OT hours in IT 2010 as 5 in salary also it is 5 only not multiplying with hour rate * 5 (OT hours)
what is the issue can anyone please clarify.
thanks and regards,
praneeth kumar
Good Document
Good document,
Ur's
Mohan
Hi ,
Your document is easily understandable.
Thanks for such a good one.
Regards,
Sindhuja.
Have you tried Sindhuja Above scenario...
Hi rajesh,
Ya going to start after finishing my work.,
Regards,
Sindhuja
HI pradeep,
Good job.
A Good document and simple way of explanation.
Thank you,
smk
Hello,
I'm very new to HCM and i have no idea about PCR's and Schemas.
Can anyone please tell me what are 9010, 9020, 2496 are? and if those are wage types, where do we have to create them?
Thank you.
Hello Mohamed,
This is an old discussion thread, by a "Former member".
In the example given, 2496 is a number used in the formula, while 9010 and 9020 are Wage Types.
Please look at the documentation on help.sap.com and the HCM/Payroll wiki page on this site for documentation on "How to create a WT", or do a search on this site or on the web.
Hi Remi,
As the author of the article seems inactive anymore, can you may be help me understand why PCR rule Z002 doesn't call Z004 and Z004 to call Z005 - this way only Z002 rule can be added to scheme. Or my assumption is wrong?
Thanks, Iskra
Hi Iskra Avdzhieva
Your assumption is wrong.
The PCR rule doesn't call PCRs but Sub-schema like Z003 in the above example can be used to call PCRs.
Best Regards,
Ahmed Gamaleldin
Hi Pradep,
Thank you for the document. Very helpful
Hi Pradeep,
I replicated the configuration and see that even when the overtime hours is not maintained, the overtime wage types appear in the payslip. How to resolve
Thanks / Karpagam Rajbabu
Modified Z005 PCR and resolved
I'm facing another scenario here. When I do cost assignment in Infotype 2010 and do the payroll run, the calculation is not happening. For One Overtime entry of 2 hours I maintained cost assignment and that entry shows in payroll log without the Amount as per screenshot. How to resolve?