Introduction

I had personally encountered issues while doing the implementation for the client. This seems to be the most common issue where the correct absence quota number [via time evaluation] was not generated at the seniority date, if the seniority date maintained in the date specifications infotype is before the hire date.

The most common solution is to attach a day balance to the base entitlement rule in the selection rule section of the table T559L and once the seniority date is arrived, push the seniority entitlement hrs/days to this day balance. This is then passed on to the QUOTA function and the accrual is processed as per the requirement.

In this document, I have briefed the SAP standard solution to address the requirement [This answers my query posted in the forum earlier – Leap year]. Without any further delay, let us move forward.

Business Scenario

Client had 3 different types of leave quotas (Annual Leave Quota, Statutory Leave Quota and Sick Leave Quota) and they had different conditions under which they accrue. But for the scope of this document, I have restricted myself to Annual leave quota grant based on the seniority date. The requirement is as below:

Years of Service Annual Leave (Days)
1st to 5th year 15
6th to 9th year 17
10th to 14th year 19
Since 15th year 20

The catch here is that the service (Seniority) date is before the hire date for most of the employees.

/wp-content/uploads/2015/10/1_804124.jpg

Issue encountered during standard configuration

As per the service date (01.09.2009), the employee completes 5 years of service on 31.08.2014. Hence, effective 01.09.2014, his base entitlement should be 17 days/year (0.4645 days/day). Let us see whether the employee accrues this entitlement:

/wp-content/uploads/2015/10/10_804133.jpg

The employee’s entitlement has not changed as on 01.09.2014. Let us see below when it gets accrued & why:

/wp-content/uploads/2015/10/11_805742.jpg

QTBASE

/wp-content/uploads/2015/10/12_805743.jpg

The employee’s entitlement has changed as on 01.09.2019 to 17 days/year.
/wp-content/uploads/2015/10/14_805752.jpg

Ideally, the system should have calculated the 5 year completion date as 31.08.2014. But as shown above, the 5 year completion date is calculated as 31.08.2019. The system has arrived at this date based on the first base period that is formed (01.09.2013 to 31.08.2014 i.e. 31.08.2014 + 5 = 31.08.2019). The first base period is formed based on the hire date of the employee (16.08.2014), immaterial of the seniority date type S2.


First base period formed based on hire date

/wp-content/uploads/2015/10/15_805753.jpg

In order to address the requirement, the custom solution explained in the introduction section is commonly implemented. However, we can build the solution via SAP standard configuration. Please have a glimpse of the solution section which will give you a snapshot of the SAP standard solution and the custom solution.

Solution

SAP Standard solution using Calculation Process functionality:

T559L

/wp-content/uploads/2015/10/1_804124.jpg

Similarly, the other seniority bands have been created as highlighted above:

/wp-content/uploads/2015/10/2_804155.jpg

/wp-content/uploads/2015/10/3_804156.jpg

We will have to use the calculation process functionality to build the SAP standard solution for our requirement.

Calculation process overview:

4.JPG

For configuration purpose, we need to adapt bottom to top approach. For easy understanding, I have taken the examples from standard definitions provided in SPRO:

1. Selection Rules

The selection rule determines which employee data is selected for the employment period calculation by the system. Each selection rule is attached to a selection class.

An Example – You want to determine how long an employee has worked at your company. The periods when the employee’s employment status is flagged as active are taken from the actions (0000) infotype. Since the data in the actions infotype may not cover the complete history of the employee, a technical entry date is to be evaluated from the date specifications infotype (0041). If such a technical entry date exists for the employee, the time interval from the technical entry date to the first personnel action entered in the system should also be included in length of service.

Two selection rules are required for our case:

– A selection rule with the status to determine the periods in the actions infotype

– A selection rule with the start date category to determine the period using the date type from the date specifications infotype and the first personnel action in the system.

2. Selection class

The selection class is a combination of selection rules that are evaluated in the same way. You use the selection class to group together these selection rules.

An Example – In the system, you can store leave balances under different absence types. If all types of leave absences are to be included in an evaluation, you must define a separate selection rule for each absence type. You can group together these selection rules in a selection class with the name leave absences. If required, you can then define an upper or lower threshold (maximum value or threshold value) for all leave absences.

3. Valuation Model

Valuation model is a combination of all the necessary selection classes. The evaluation of each selection class is also defined within the valuation model. The valuation model determines how the employee data from the individual infotype records is evaluated in the calculation of the employment period.

4. Calculation Process

A calculation process is created for calculation of an employment period.

5. Rounding rules

The valuation model specifies time data such as years, months, days and, if required, decimal days. With the help of rounding rules, you can round decimal days, days and months up or down. The system always rounds to the upper limit.


The rounding rule converts 30 days to 1 month and 12 months to 1 year. Only use a rounding rule if the calculation process is evaluated in years, months and days using the conversion rule. Otherwise, the rounding rule will generate unwanted results. If the evaluation only uses days, the rounding rule would round a result of 80 days to months, 20 days.

6. Assign Valuation Model and Rounding Rule to Process Step

The valuation model and rounding rule is assigned to calculation process or to its process steps. One can use the feature SENOR to perform a differentiated assignment of the valuation model and the rounding rule based on the employee’s organization assignment. For our requirement, the maintenance of this feature is not required.

Let us now look into the configuration steps and how we realize our requirement.

SPRO -> Personnel Management -> Personnel Administration -> Evaluation Basis -> Calculation of Employment Period -> Valuation Model -> Selection Rule -> Define Selection Rule

We will create a selection rule for choosing the start date (as service date S2). So, we will only use the start date tab and leave all the other tabs untouched.

/wp-content/uploads/2015/10/2_804155.jpg/wp-content/uploads/2015/10/3_804156.jpg

We will use the standard selection rule ST23 as it is, for checking the employment status.

/wp-content/uploads/2015/10/4_804157.jpg/wp-content/uploads/2015/10/5_804810.jpg

SPRO -> Personnel Management -> Personnel Administration -> Evaluation Basis -> Calculation of Employment Period -> Valuation Model -> Selection Class


Since we have a custom selection rule, we will have to create custom selection class to map our selection rules.

/wp-content/uploads/2015/10/6_804815.jpg

SPRO -> Personnel Management -> Personnel Administration -> Evaluation Basis -> Calculation of Employment Period -> Valuation Model -> Define Valuation Model

Again, we will have to create custom valuation model as we have a custom selection class and this is also applicable to further processes like creating custom calculation process and its mapping.

/wp-content/uploads/2015/10/7_804816.jpg

Mapping selection class to the valuation model

/wp-content/uploads/2015/10/8_804817.jpg

SPRO -> Personnel Management -> Personnel Administration -> Evaluation Basis -> Calculation of Employment Period -> Valuation Model -> Define Rounding Rule

We will have to use a rounding rule as our calculation process will be evaluated in years, months and days using conversion rule (you may see this in the next SPRO step). We will be using standard rounding rule as this matches our requirement.

/wp-content/uploads/2015/10/9_804818.jpg

SPRO -> Personnel Management -> Personnel Administration -> Evaluation Basis -> Calculation of Employment Period -> Calculation Process -> Define Calculation Process

/wp-content/uploads/2015/10/10_804133.jpg

SPRO -> Personnel Management -> Personnel Administration -> Evaluation Basis -> Calculation of Employment Period -> Calculation Process -> Assign Valuation Model and Rounding Rule to Process Step

/wp-content/uploads/2015/10/11_805742.jpg

Now we will map this calculation process to our base entitlement in the table T559L:

/wp-content/uploads/2015/10/12_805743.jpg

Please see below the time evaluation output:


On 31.08.2014, the employee completes 5 years of service as per the service date (01.09.2009).

/wp-content/uploads/2015/10/1_804124.jpg
/wp-content/uploads/2015/10/2_804155.jpg

On 01.09.2014, the employee enters into the 6th year of service, so the entitlement should be 17 days/year:

/wp-content/uploads/2015/10/3_804156.jpg

As on 31.08.2018, the employee completes 9 years of service.

/wp-content/uploads/2015/10/4_804157.jpg

/wp-content/uploads/2015/10/5_804810.jpg

As on 01.09.2018, the employee enters into 10th year of service.

/wp-content/uploads/2015/10/6_804815.jpg
This way we can build the standard solution to cater to the requirement.


Just would like to show the custom solution (away from standard solution), which is generally implemented:


T559L (All the configurations are same as earlier configuration except the ones shown below)


Attach day balance to the base entitlement

/wp-content/uploads/2015/10/7_804816.jpg

/wp-content/uploads/2015/10/8_804817.jpg

Create a custom rule as below:

/wp-content/uploads/2015/10/9_804818.jpg

In the schema, please place the custom rule above the functions CUMBT and QUOTA.


Please see below the time evaluation output:


5 years completion

/wp-content/uploads/2015/10/10_804133.jpg

/wp-content/uploads/2015/10/11_805742.jpg
Start of 6th year

/wp-content/uploads/2015/10/12_805743.jpg

9 years completion

/wp-content/uploads/2015/10/13_805744.jpg

/wp-content/uploads/2015/10/14_805752.jpg

Start of 10th year

/wp-content/uploads/2015/10/15_805753.jpg

Hence, for this type of requirement as per my knowledge we can have 3 types of solution:

– SAP standard solution using calculation process

– SAP standard solution using base entitlement [Choose the radio button for Base period under T559L -> Selection rule -> Base entitlement tab -> seniority calculation section -> Base period] for seniority calculation

– Custom solution

The 2nd solution is possible if your client agrees to load all the employee hire dates equal to the service date.

Please note that there are different ways of arriving at a solution (not restricted to above). But always give it a thought before proceeding with custom solution as the best practice of providing solution is the standard way.

Hope you had a wonderful time going through this document. Thanks for your patience and time!!!

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

    1. M Arun Post author

      Hi Sriram,

      Thank you. Yes we can may use HDATE as well. But for my scenario it did not work as I had 2 other date types that needs to be referred for other quotas.

      Rgds,

      Arun.M

      (0) 
  1. Babu Ramanujam

    Hi Arun,

    Excellent Documentation.

    I have one small doubt. Will it work if the Service date (S2) is less than Hiring date (Begda in IT0000). When I try this, it has not been worked. Will it work when we generate the Abs Quota by using RPTQTA00 report.

    Thanks,

    Babu.

    (0) 
  2. Santosh R. Shivane

    Hi,

    You have given very nice details.

    My client wants to exclude the seniority if the employee will be on unpaid leave.

    How can resolve the issue, can you please suggest.

    I am generating the Leave quota through PT_QTA00 and -ve time mgt.

    Any user exit available, please suggest.

    Best Regards,

    Santosh Shivane

     

    (0) 

Leave a Reply