You are on page 1of 4

Simple way of writing a PCR

Scenario: Overtime Calculation


Employees 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 = ( asic ! "#$ % #&'(. )sing standard schema, we cannot achieve this. *e will create a custom rule and add that rule in custom schema.

Copying Standard Schema:


T+O,E- .E/". Enter 0chema name and clic1 on +opy button. Enter TO 0chema. +opy 02. 0tandard 0chema (3T//$ to 4 0chema (4//5$.

Rule Creation:
T+O,E- .E/#. Enter Rule name and clic1 on +reate button. 6n 2ttributes, enter .rogram +lass 7+ (.ayroll$.

+reate a Rule (4//#$ for calculating OT Rate. Each rule contains operations to process payroll data in internal tables. 6n the below rule we have used 28T, 2,,*T and 96::9 operations.

28T!"#- 2mount of the current wagetype is multiplied with "#. 2,,*T '/"/- The +urrent wagetype values are added to wagetype '/"/ into OT table. 96::9- This will reset the value of current wagetype. 2,,*T !- 2dding current wagetype to OT table.

+reate another rule(4//&$ to send amount of wagetype '/"/ to wagetype '/#/.

+reate a rule(4//;$ to multiply Rate with <umber to get 2mount.

6nsert the newly created rules into schema 4//5.

Data Maintenance:
<ow enter wagetype '/#/(Overtime$ and number of hours in Employee Remuneration 6nfo (#/""$ infotype.

Executing Payroll:

Check Payroll Results:

You might also like