Online Tutorials & Training Materials |
Register Login

Year of Service Calculation

amit butola || 29 Jan 2014 11:06 am || 1

On termination of an employee how to calculate year of service?

Say employee is hired on 01/06/2000 (maintained in a date type in IT 41).
Last Employment Date is 07/07/2010

Calculation is as follows:
From 01/06/2000 to 31/05/2010, employee completes 10 Years
From 01/06/2010 to 07/07/2010, total 37 calendar days (30 days + 7 days)
YOS = 10 + (37/365) = 10.10 (years)
The final result of YOS will have 2 decimal places.

Can someone suggest how we can achieve it through payroll pcr?

Thanks in Advance.

You can view more tutorials about SAP HR


  • 31 Jan 2014 12:30 pm

    In a payroll PCR, you could use NUM=FXXJ A where XX stands for the date type from IT0041. This will calculate the time on years between the date for the date type on IT0041 and the end date of the payroll period. The value should appear to two decimal places.
    You can also use RTE=F or AMT=F. I just tend to use NUM.
    The function DATES must be called somewhere in the schema prior to the call of this rule.
    After the NUM=FXXJ A operation, you can then make a decision on the value in the field by using NUM?, NUM< or NUM>.