Introduction


For the last few days, I came across many queries in SCN (SAP Community Network) regarding grant of absence quotas in time evaluation run. And consultants were facing issues in generation of the correct value of the quota.


Also, there are multiple ways things can be done and hence, I found that it was sometimes getting difficult to find out where the consultants were facing issues. Because of this, I thought of coming up with a knowledge artifact with step by step configuration details of absence quotas grant in time evaluation run.





Client Situation


The client was implementing positive time management and it had the below requirements regarding absence quotas:


Annual Leave


  • Base Entitlement for a year = 20 days
  • Validity Interval = calendar year
  • Annual Leave quota of 20 days to be granted at the start of calendar year.
  • If the employee is being hired in the middle of the calendar year, then the grant of annual leave quota should be prorated. Also, the prorated quota of annual leave should be rounded off to the nearest integer.

Sick Leave


  • Base Entitlement for a year = 7 days
  • Validity Interval = calendar year

  • Sick Leave quota of 7 days to be granted at the start of calendar year or at the time of hiring. There is no proration for sick leave quota if the employee gets hired in the middle of the calendar year.

Recreation Leave


  • Base Entitlement for a year = 5 days

  • Validity Interval:  01-Jul to 30-Jun
  • Recreation Leave quota of 5 days to be granted on 01-Jul or at the time of hiring between 01-Jul and 31-Dec. There is no proration of recreation leave quota if the employee gets hired in the middle of the calendar year.

Since the client was implementing positive time management, the positive time evaluation could run successfully in actual mode only till the day the actual data is available. Hence, for 01-Jan, the time evaluation will run after the shift has got over provided this was a day shift.



Solution Design


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


Step 1: SPRO > Time Management > Time Data Recording and Administration > Managing Time Accounts Using Attendance/ Absence Quotas > Setting Groupings for Time Quotas > Group Employee Subgroups for Time Quotas




Step 2: SPRO > Time Management > Time Data Recording and Administration > Managing Time Accounts Using Attendance/ Absence Quotas > Setting Groupings for Time Quotas > Group Personnel Subareas for Time Quotas

 

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

Step 4: 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 5: SPRO > Time Management > Time Data Recording and Administration > Managing Time Accounts Using Attendance/ Absence Quotas > Calculating Absence Entitlements > Rules for Generating Absence Quotas > Specify Rule Groups for Quota Type Selection > Modify Feature QUOMO

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 > Set Base Entitlements > Base Entitlement for Absence Quota Generation

 

Step 7: 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

Annual leave starts at the start of calendar year and continues till the end of the calendar year.

Sick Leave start at the start of calendar year and continue till the end of calendar year.

Recreation Leave starts 6 months after the start of calendar year (July) and continues till 6 months after the end of calendar year (June).

Step 8: SPRO > Time Management > Time Data Recording and Administration > Managing Time Accounts Using Attendance/ Absence Quotas > Calculating Absence Entitlements > Rules for Generating Absence Quotas > Define Rules for Reducing Quota Entitlements > Reduction Rules


The above rule was copied from standard rule 05. The reference period for reduction rule for inactive days is as per base period (calendar year).

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


We are using standard rule 01 which means that any value between X and X.5 (X.5 not included) gets rounded off to X and any value between X.5 (X.5 included) and X+1 gets rounded off to X+1 where X is an integer.

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


We define three daily time types – one for each type of leave quota.

Step 11: 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.


Annual Leave


Please note that the accrual period is daily. This implies that every day 20 days of annual leave will accrue.

Please note that “No pro rata calculation” has been selected. It is also getting multiplied by daily time type ZAL1. The value of this time type will be 1 either on 01-Jan or on the hiring date. On other days, the value of the time type will be 0.


Hence, even though the accrual will happen every day for 20 days of quota, once it gets multiplied by the value of time type ZAL1, it will grant 20 days only for 01-Jan or hiring date (Time Type ZAL1 will have value 1). For the remaining days, the value of time type ZAL1 will be 0 and hence, the accrual for remaining days will get reduced to 0.


The reduction rule is Z1 so that the annual leave gets prorated if the employee gets hired in the middle of the year.


The rounding rule is 01 so that the quota can be rounded off to the nearest integer.



The accrued quota will get transferred upon accrual.

Sick Leave

Please note that the accrual period is daily. This implies that every day 7 days of sick leave will accrue.

Please note that “No pro rata calculation” has been selected. It is also getting multiplied by daily time type ZSL1. The value of this time type will be 1 either on 01-Jan or on the hiring date. On other days, the value of the time type will be 0.


Hence, even though the accrual will happen every day for 7 days of quota, once it gets multiplied by the value of time type ZSL1, it will grant 7 days only for 01-Jan or hiring date (Time Type ZSL1 will have value 1). For the remaining days, the value of time type ZSL1 will be 0 and hence, the accrual for remaining days will get reduced to 0.


The reduction rule is blank so that the sick leave doesn’t get prorated if the employee gets hired in the middle of the year.



The accrued quota will get transferred upon accrual.

Recreation Leave

Please note that the accrual period is daily. This implies that every day 5 days of recreation leave will accrue.

 

Please note that “No pro rata calculation” has been selected. It is also getting multiplied by daily time type ZRL1. The value of this time type will be 1 either on 01-Jan or on the hiring date. On other days, the value of the time type will be 0.


Hence, even though the accrual will happen every day for 5 days of quota, once it gets multiplied by the value of time type ZRL1, it will grant 5 days only for 01-Jan or hiring date (Time Type ZRL1 will have value 1). For the remaining days, the value of time type ZRL1 will be 0 and hence, the accrual for remaining days will get reduced to 0.


The reduction rule is blank so that the recreation leave doesn’t get prorated if the employee gets hired in the middle of the year.

The accrued quota will get transferred upon accrual.

Step 11: Create PCRs for Absence Quotas Generation

In the above PCR, we find the difference between date of time evaluation day and hiring date using HRS=YDAA01 and compare it with 0 using HRS?0. If the difference is 0, it means that it is the hiring date and it should pass a value of 1 using HRS=1 and generate time type using ADDDDBZAL1Z.


If the difference is not 0, then we read the current month using VARSTCURMO. If the month is anything other than Jan (01), it should do nothing. If the month is Jan (01), it should read the current day using VARSTREDAY. If the current day is anything other than 01, then it should do nothing. If the current day is 01, then it should pass a value of 1 using HRS=1 and generate time type using ADDDDBZAL1Z.


In the above PCR, we find the difference between date of time evaluation day and hiring date using HRS=YDAA01 and compare it with 0 using HRS?0. If the difference is 0, it means that it is the hiring date and it should pass a value of 1 using HRS=1 and generate time type using ADDDDBZSL1Z.


If the difference is not 0, then we read the current month using VARSTCURMO. If the month is anything other than Jan (01), it should do nothing. If the month is Jan (01), it should read the current day using VARSTREDAY. If the current day is anything other than 01, then it should do nothing. If the current day is 01, then it should pass a value of 1 using HRS=1 and generate time type using ADDDDBZSL1Z.



In the above PCR, we find the difference between date of time evaluation day and hiring date using HRS=YDAA01 and compare it with 0 using HRS?0. If the difference is 0, it means that it is the hiring date and it should check the month using VARSTCURMO. If the month is 07, 08, 09, 10, 11 or 12, then it should pass a value of 1 using HRS=1 and generate time type using ADDDDBZRL1Z. If it is any other month, then it should do nothing.


If the difference is not 0, then we read the current month using VARSTCURMO. If the month is anything other than Jul (07), it should do nothing. If the month is Jul (07), it should read the current day using VARSTREDAY. If the current day is anything other than 01, then it should do nothing. If the current day is 01, then it should pass a value of 1 using HRS=1 and generate time type using ADDDDBZRL1Z.


Step 12: Modify Positive Time Schema ZPT1

The three PCRs ZAL1, ZSL1 and ZRL1 are placed in positive time schema ZPT1 (copy of standard schema TM00) after standard PCR TR30 and before function CUMBT. Please ensure that the PCRs are placed before function CUMBT so that the time types generated by the PCRs move from Table TES to Table ZES.


The function QUOTA will read the table ZES for these time types and generate the quotas if all the validations pass.


Let us proceed to test the solution.

Solution Testing


We will use the below scenarios of testing.


Scenario 1: Hire an employee on 01-Jan-2014 and run time evaluation on this date.


IT0000

IT0001


IT0007



IT0041


PT60

Time Evaluation Successful


PCR Processing

Quota Generation

Quota Tables


IT2006

Scenario 2: Hire an employee on 30-Jun-2013 and run time evaluation for 30-Jun-2013 and 01-Jul-2013.


IT0000

IT0001


IT0007


IT0041


PT60

Time Evaluation Successful


PCR Processing

Quota Generation


Annual Leave quota gets prorated.

No proration for Sick Leave.

Recreation Leave doesn’t get generated in Jun.


Quota Tables

IT2006

PT60 on 01-Jul-13

PT60 Successful

PCR Processing

Quota Generation



Quota Tables


IT2006