Skip to Content
Author's profile photo Former Member

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).

/wp-content/uploads/2012/03/l10_82033.png

Rule Creation:

TCODE: PE02.

Enter Rule name and click on Create button. In Attributes, enter Program Class ‘C’ (Payroll).

/wp-content/uploads/2012/03/l1_82039.png

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.

/wp-content/uploads/2012/03/l2_82043.png

Create another rule(Z004) to send amount of wagetype 9010 to wagetype 9020.

/wp-content/uploads/2012/03/l3_82045.png

Create a rule(Z005) to multiply Rate with Number to get Amount.

/wp-content/uploads/2012/03/l4_82049.png

Insert the newly created rules into schema Z003.

/wp-content/uploads/2012/03/l6_82050.png

Data Maintenance:

Now enter wagetype 9020(Overtime) and number of hours in Employee Remuneration Info (2011) infotype.

/wp-content/uploads/2012/03/l7_82051.png

Executing Payroll:

/wp-content/uploads/2012/03/l8_82055.png

Check Payroll Results:

/wp-content/uploads/2012/03/l9_82056.png








Assigned Tags

      20 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Binu Philipose Thevalliel
      Binu Philipose Thevalliel

      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

      Author's profile photo Upendra Krishna
      Upendra Krishna

      Hi Binu,

      You can click on the screen shots then they will pop up in larger image and will be clear.

      Regards

      Upen

      Author's profile photo Binu Philipose Thevalliel
      Binu Philipose Thevalliel

      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...

      Author's profile photo Upendra Krishna
      Upendra Krishna

      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.

      Author's profile photo Former Member
      Former Member

      HI wen clik on scren shots they are not opening ..........

      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo Rajesh Kumar Burra
      Rajesh Kumar Burra

      Good Document

      Author's profile photo Kavali V Leelamohanrao
      Kavali V Leelamohanrao

      Good document,

      Ur's

      Mohan

      Author's profile photo SINDHUJA CHANDRASEKARAN
      SINDHUJA CHANDRASEKARAN

      Hi ,

           Your document is easily understandable.

           Thanks for such a good one.

      Regards,

      Sindhuja.

      Author's profile photo Rajesh Kumar Burra
      Rajesh Kumar Burra

      Have you tried Sindhuja Above scenario...

      Author's profile photo SINDHUJA CHANDRASEKARAN
      SINDHUJA CHANDRASEKARAN

      Hi rajesh,

           Ya going to start after finishing my work.,

      Regards,

      Sindhuja

      Author's profile photo Former Member
      Former Member

      HI pradeep,

      Good job.

      A Good document and simple way of explanation.

      Thank you,

      smk

      Author's profile photo Mohammed Afaque Shariff
      Mohammed Afaque Shariff

      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.

      Author's profile photo Rémi Corriveau
      Rémi Corriveau

      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.

      Author's profile photo Iskra Avdzhieva
      Iskra Avdzhieva

      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

      Author's profile photo Ahmed Gamaleldin
      Ahmed Gamaleldin

      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

      Author's profile photo Karpagam Rajbabu
      Karpagam Rajbabu

      Hi Pradep,

      Thank you for the document.  Very helpful

      Author's profile photo Karpagam Rajbabu
      Karpagam Rajbabu

      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

      Author's profile photo Karpagam Rajbabu
      Karpagam Rajbabu

      Modified Z005 PCR and resolved

      Author's profile photo Karpagam Rajbabu
      Karpagam Rajbabu

      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?