Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
vianshu
Active Contributor

Introduction


In the last few days, I have also seen queries regarding solution for balance absence quota carry forward in SCN (SAP Community Network). There are a couple of methods to achieve the solution for this requirement. In this document, I will cover step by step configuration and testing for the first method. And may be when I have time, I will come up with another document on the second method.

Client Situation


Below are the client requirements with respect to balance absence quota carry forward.


Annual Leave


  • The annual leave quota gets generated in time evaluation either on 01-Jan or on the hiring date and has validity till 31-Dec of the given year.

  • On 31-Dec of every year, the remaining balance of annual leave quota should get carry forward to next year.

  • The validity and deduction interval for the carry forward annual leave quota will be for the next calendar year.

  • A maximum of 5 days balance can be carried forward to the next year. If the balance is more than 5 days, extra days above 5 days will lapse.

Sick Leave


  • The sick leave quota gets generated in time evaluation either on 01-Jan or on the hiring date and has validity till 31-Dec of the given year.

  • On 31-Dec of every year, the remaining balance of sick leave quota should get carry forward to next year.

  • The validity and deduction interval for the carry forward sick leave quota will be for the next calendar year.

  • The entire quota balance should get carried forward to next year.


Privilege Leave


  • The privilege leave quota gets generated by program RPTQTA00 and the validity of the leave quota is from 01-Jan of current year till 31-Mar of next year. Hence, the quotas will overlap during Jan – Mar next year.

  • On 31-Mar of next year, the remaining balance of previous year Privilege Leave Quota should be carried forward to next year for the period from Apr – Dec.

  • The validity and deduction of interval for the carry forward privilege leave quota will be for 01-Apr till 31-Dec.

  • A max of 7 days can be carry forward to the next year.



Solution Design


Let me give you step by step configuration of the solution design.


I assume here that the quotas for annual leave, sick leave and privilege leave have already been created.


We would need to create carry forward quotas for annual leave, sick leave and privilege leave. But before we do that, let us create few daily time types for our solution.


Step 1: SPRO > Time Management > Time Evaluation > Time Evaluation Settings > Define Time Types

 

 

 

Step 2: SPRO > Time Management > Time Data Recording and Administration > Managing Time Accounts Using Attendance/ Absence Quotas > Time Quota Types > Define Absence Quota Types

The actual quotas are as mentioned below:


  • 91      -        Annual Leave Quota
  • 95      -        Sick Leave Quota
  • 97      -        Privilege Leave Quota

The carry forward quotas will be defined as below:


  • 71      -        CF Annual Leave Quota
  • 75      -        CF Sick Leave Quota
  • 77      -        CF Privilege Quota

 

Step 3: SPRO > Time Management > Time Data Recording and Administration > Managing Time Accounts Using Attendance/ Absence Quotas > Calculating Absence Entitlements > Automatic Accrual of Absence Quotas > Permit Generation of Quotas in Time Evaluation

Step 4: SPRO > Time Management > Time Data Recording and Administration > Managing Time Accounts Using Attendance/ Absence Quotas > Calculating Absence Entitlements > Rules for Generating Absence Quotas > Set Base Entitlements > Base Entitlement for Absence Quota Generation

 

The carry forward time types have been assigned as base entitlement for carry forward quotas respectively.

Step 5: SPRO > Time Management > Time Data Recording and Administration > Managing Time Accounts Using Attendance/ Absence Quotas > Calculating Absence Entitlements > Rules for Generating Absence Quotas > Determine Validity and Deduction Periods

 

This quota is valid for the period Apr – Dec.

Step 6: SPRO > Time Management > Time Data Recording and Administration > Managing Time Accounts Using Attendance/ Absence Quotas > Calculating Absence Entitlements > Rules for Generating Absence Quotas > Define Generation Rules for Quota Type Selection


We will define the selection rules for the three absence quotas.


C/F Annual Leave

 

C/F Sick Leave

 

C/F Privilege Leave

 

 

 

Step 7: Create Constants for Leave Balance Thresholds

Step 8: Create PCRs for Reading Balance Quotas at Quota End Date


PCR ZALB reads the balance annual leave quota on 31-Dec using HRS=FR91C and passes the value to time type ZALB.

PCR ZSLB reads the balance sick leave quota on 31-Dec using HRS=FR95C and passes the value to time type ZSLB.



On 31-Mar, PCR ZPLB finds the difference between current date and quota end date for the earliest record. If the difference is 0, it means that this is the record for which quota needs to be read. If there is only one record of 97 which will be the case of new hire, the difference between current date and quota end date will be greater than 0.


If the difference is 0, it reads the remaining balance of privilege leave for the first record and passes it to time type ZPLB.




Step 9: Create PCRs for Bringing Forward Balance Quotas

PCR ZALC reads the value of time type ZALB for 31-Dec and compares with the value of constant ZALTH (value = 5) on 01-Jan. If the values is less than 5, it passes the value to time type ZALC and if it is more than 5, it passes value 5 to time type ZALC.



PCR ZSLC reads the value of time type ZSLB for 31-Dec and passes it to time type ZSLC on 01-Jan.



PCR ZPLC reads the value of time type ZPLB for 31-Mar and compares with the value of constant ZPLTH (value = 7) on 01-Apr. If the values is less than 7, it passes the value to time type ZPLC and if it is more than 7, it passes value 7 to time type ZPLC.




Step 10: Add PCRs to Time Schema


 

The PCRs ZALB, ZSLB and ZPLB which read the remaining balance at quota end date should be introduced in time schema after function QUOTA. This will be especially useful in arriving at the correct remaining leave balance in case of daily accrual of leaves where a small fraction of leave gets accrued and transferred every day.


Please ensure that you introduce function CUMBT in the time schema again after the PCRs ZALB, ZSLB and ZPLB. This is done to transfer the time types generated in these PCRs from Table TES to Table ZES.


The PCRs ZALC, ZSLC and ZPLC which bring forward the leave balance from previous day to the current day should be introduced after standard PCR TR30 and before function CUMBT. This is done so that the time types generated in these PCRs can move from Table TES to Table ZES in function CUMBT for quota generation.


Let us now proceed to testing.




Solution Testing


IT2006 (as on 01-Jan-13)


Let us assume that the employee didn’t apply any leave in the year 2013.


Run time evaluation for 31-Dec-13.


PCR Processing for 31-Dec-13


PCR ZALB reads the remaining balance on 31-Dec for annual leave quota and passes it to time type ZALB.



PCR ZSLB reads the remaining balance on 31-Dec for sick leave quota and passes it to time type ZSLB.



Table ZES

Timetypes ZALB and ZSLB have values 20 and 7 respectively on 31-Dec-13.



Run time evaluation for 01-Jan-14


PCR Processing for 01-Jan-14


PCR ZALC brings forward remaining annual leave balance from time type ZALB and compares it with the value in constant ZALTH (value = 5). Since it is greater than 5, it passes the value 5 in time type ZALC.

PCR ZSLC brings forward remaining sick leave balance from time type ZSLB to time type ZSLC.

Table ZES



IT2006


C/F quotas as well as quotas for the year 2014 get created.

Run time evaluation for 31-Mar-14


PCR Processing


PCR ZPLB reads the privilege leave balance available on 31-Mar from the record with earliest validity start date.



Table TES

The value of time type ZPLB on 31-Mar is 12 and not 24. Hence, it proves that only the first record of quota 97 has been read.

Run Time Evaluation for 01-Apr-14


PCR Processing

PCR ZPLC brings forward the remaining balance in time type ZPLB and compares it with the value in constant ZPLTH (value = 7). Since it is greater than 7, it passes the value of 7 to time type ZPLC.


Table ZES

IT2006

C/F Privilege Leave has got generated for the period 01-Apr-2014 till 31-Dec-2014 for 7 days.


Here, I come to the end of this knowledge artifact. Thank you for your patience to go through this long document. I hope this has been useful for you.



Thanks and regards,

Vivek Barnwal.


*****************************************************************************************************

You can also refer to other knowledge artifacts created by me at the below link:


One Stop Shop of my Knowledge Artifacts in SAP HCM

59 Comments