Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert

Greetings to the EC Time community !

As the 2H 2023 release upgrade approaches, I am delighted to introduce you to an entirely new way of counting absences as opposed to the prior absence counting method in Employee Central Time Off. We refer to this as Absence Counting Rules 2.0 since it represents a new era in absence counting, one that is far more adaptive and intelligent due to the use of business rules framework 🙂

With the public holiday enhancements in the previous versions, we laid the groundwork for Absence Counting Rules 2.0 design and development and that's why, the Absence Counting Rules 2.0 couldn't have been released at a better time than now. We reinforce our localization needs even more with improved absence counting, bringing SuccessFactors Time Management up to line with the SAP HCM On-Premise solution. We now offer many more configuration possibilities than before thanks to this innovation.
Additionally, we fulfilled several improvement requests with an incredibly high amount of votes. Here are a few examples requests:

and the list continues…..I believe many of our customers have been anticipating this update, which is now a reality😊.
Here’s a sneak peek into an Absence Counting Rule wherein you want 0.5 days deducted for half-working days.

Let me introduce you to absence counting and explain why we even need it before going into the specifics.


When an absence is recorded, the system normally looks at the employee's daily work schedule, temporary time information, holiday calendar, and holiday work pattern to determine the planned working time i.e., the default absence hours. This method of calculating absence hours, however, is not always acceptable because it is based on the planned hours.

There are situations when you must adhere to legal or company-specific rules while counting absences. You want to treat public holidays, certain weekdays, and non-working days differently when calculating the deduction hours. The calculation may differ depending on working time shift classifications (for example, part-time employees may be paid differently than full time employees).

It may also be based on average values or standard weekly hours rather than the actual planned working times. Furthermore, the rules must sometimes be applied to absences that do not deduct from a time account. The existing counting method could not handle these complex requirements.

In nutshell, to be legally compliant, absence counting rules must be applied so that absence hours can be evaluated and compensated differently.

In this blog post, we’ll go through the specifics of the functionality provided by absence counting rules 2.0, as well as how to configure the system for various use cases that require absence counting.

The topics I will explore in depth are listed below:

    • A few interesting facts about absence counting rules 2.0.
    • An introduction to the new configuration object.
    • How to implement absence counting rules for diverse use cases.
    • EC Payroll Integration and the impact on the Time Sheet

Then grab your favorite drink and let's get started 😊.

Few interesting facts about absence counting rules 2.0

We designed the day-based absence counting rules harnessing the powerful business rule-based framework. This also brings some flexibility, but we must be mindful of the performance implications. Before you begin adopting Absence Counting Rules, you should be aware of the following:

    • The absence counting rule-based feature allows you to override the default planned working hours derived from the employee's work schedule, temporary time information, holiday calendar and holiday work pattern.
    • You can set either the deduction quantity or deduction factor for specific weekdays, shift classifications, holiday categories, holiday work patterns or standard weekly hours from the Job Information among other things. You cannot change the number of days and number of hours fields. How many of you have used a workaround to set the deduction quantity or posting quantity using basic rule scenario in take rules  or using save rule in Time Accounts? 😉 The truth is that you do not need these crazy workarounds anymore. I encourage you to get rid of those workarounds and implement absence counting rules.
    • While utilizing the previous Counting Method, some of you may have implemented a workaround to assign a dummy Time Account Type to the Time Type. This is no longer necessary because the new technique allows you to associate an absence counting configuration with a time type even if no time account posting rule is applied.
    • Unlike the old Absence Counting Method, which could only be applied to the whole absence period, the absence counting rule is day-based, which means it is processed for each absence day covered by the rule.
    • A new rule scenario called "Absence Counting" is provided which gets triggered whenever an absence is created or updated. Absence counting rules are applied even when absences are imported.
    • The counting rule cannot be used for absences which are longer than 24 months. This is because the rule can get triggered for example 365*2=730 times for a 2-year long absence, resulting in poor UI performance. As a result, we must use caution while applying the counting rules. In the configuration section, I'll give you some pointers on how to limit the number of absence days handled by the rule.
    • You cannot use both the old Absence Counting Method and the new Absence Counting Configuration simultaneously. You can only use one at a time. I would urge you to use the new rule-based absence counting configuration setup because it meets the majority of your needs and is scalable for future enhancements.
    • The absence counting rules cannot be used for Time Off for LOA only or if you have enabled flexible requesting for a time type.
    • Another noteworthy point is that utilizing the "Business Rule Execution Log," you can easily simulate the results of the absence counting rule. Whenever an absence is created using the Time Off UI, the rule is triggered even before the absence is submitted.

Configuration of Absence Counting Rules

Before getting into the detailed implementation of the use cases, I would like to explain the new configuration object.

With this enhancement, we deliver a new configuration object called Absence Counting Configuration. This object needs to be assigned to the relevant time type for which you want to override the default absence deduction quantity.

You need to have the permissions set for this object to make it visible under Manage Data.

The most important fields are the “Absence Counting Rule” and the three filter fields called “Holiday Selection”, “Planned Working Time Section and “Weekdays Selection”.

    • The “Absence Counting Rule” is your business rule where you set the deduction quantity or the deduction factor depending on the criterion.
    • The three filter fields are used to reduce the number of absence days which shall be processed by the absence counting rule. Based on your use case, you must select at least one of the filter fields.

If you want to count only holidays differently, enter "Include holidays" in the "Holiday Selection" field. This means that your rule processing only includes absence days that are holidays.

Assume a 2-week absence from December 18th to January 1st includes 2 public holidays and your requirement is to count holidays as 1 day instead of 0 days, then use the filter “Include Holidays” in the “Holiday Selection” field.

Furthermore, if you want to count “Fridays” different, then you can select “Include Fridays” in the “Weekdays Selection” field.

It is extremely important to use these filters marked in the screenshot to not end up in slow UI performance.

Through elaborated and formatted help texts, we provide clear recommendations. I hope this helps to make your lives easier 🙂 .

With this enhancement also comes a new rule scenario called “Absence Counting”. The absence counting rules can only be created using this rule scenario. If you click on the “+” button on the “Absence Counting Rule” field in the absence counting configuration object, it will take you to this rule scenario.

There are input and result parameters provided with this rule scenario which you can use in your rule definition.

    • The input parameters can be used in your “If” conditions to define your selection criteria.
    • The output parameters can be used to “Set” the desired value of the absence deduction days/hours.
    • The Employee Time and Employee Time Calendar objects are also available in the rule. For Example: You can use the “Number of Days” field to know if planned hours = 0 or you can use the field “Absence Duration Category” to determine if an absence is a partial day or full day. This field is newly delivered with 2H 2023 release and is also available with SAP Analytics Cloud reporting.
    • There is a list of general rule functions like add(), divide(), round(), create date(), get number of calendar days() etc. which are provided to perform any calculations in your rule. Round() for instance can be used if you want to round the quantity to a nearest whole number.

Here is how the parameters of the new rule scenario looks:

Now let’s go through some example use cases and how to implement them step-by-step.

How to Implement absence counting rules

Let me take you through some of the important use cases which you might also have come across during your implementations and had to workaround those cases until now. You will not need those workarounds anymore because you can now leverage the absence counting rules 2.0 and implement a standard solution😊.

I will explain the step by step procedure to implement the following use cases:

    • Absence counting based on different holiday categories.
    • Absence counting on specific weekdays.
    • Absence counting on non-working days.
    • Absence counting based on different shift classifications.
    • Absence counting based on average values.
    • Absence counting based on holiday work pattern.
    • Absence on half holidays should count as full day absence.
    • Holiday in between leaves should be counted as Absence.

Depending on the use case you are interested in, you can jump to the section relevant for you.

Absence counting based on different holiday categories

As you know, we moved from Holiday Classes to more flexible holiday categories with the public holiday related enhancements. You can define different holiday categories for different types of holidays such that the absence hours can be calculated differently depending on the holiday category.
Here is one such use case where holiday category is used in absence counting:
An enterprise has two categories of holidays - government-declared and company-declared. The company-declared holidays don’t usually have the same rule as the regular government-declared public holidays and shall not be counted.

Example: For Maternity Leave, the employee is allowed to request up to 60 calendar days of leave. However, the company-declared holidays should not be counted as part of those 60 days. If there are 2 company holidays in the leave period, the system should only count 58 days.

Step 1: Create the absence counting configuration object. In this example, we need to count the holidays differently, hence we need the days with holidays in the counting rule. In addition, since non-working days should be counted as “Calendar days”, we need to include non-working days as well. Therefore, we should include the days with planned hours = 0 by setting the field “Planned working time selection”.

Step 2: Create the Absence Counting Rule and assign it to the field “Absence Counting Rule”. Since company holidays should not be counted as absence days, set the deduction quantity to 0 if Holiday Category = Company Holiday. Holiday Category is a parameter available under “Absence Counting Rule Parameters”. The else part is used because non-working days and other holiday categories should be counted as 1 day.

Step 3: Assign this Absence counting configuration to the time type and set the “Duration Display According To” as Deduction Quantity because you would want to display the deduction quantity on the UI.

Note that the “Deduction Quantity” field in Employee Time object is set not only when a time type deducts from a time account but also if there is no time account posting rule assigned.

There are 2 holidays with holiday category “Company Holiday” in the period from August 1st to September 30th.

If you create an absence from August 1st to September 30th, the deduction quantity is calculated as 59 days using the new absence counting rule. That's because there are total of 61 calendar days and the two company holidays are not counted.

Absence counting on specific weekdays

We define the number of working hours for each day in an employee’s work schedule. However, each day is counted as 1 day if the time type shall be deducted in days. There are times where specific days are half-working days because the working time is 4 hours instead of regular 8 hours.

Example 1: An employee’s work schedule is defined as a 6-day working week with Monday to Friday as 8 hours a day and Saturdays as 4 hours a day. If employee requests leave that includes Saturdays, then 0.5 days should be deducted for Saturday and 1 day should be deducted for other weekdays.

This is how the leave deduction should happen for individual days:

Step 1: Create the absence counting configuration object. In this example, we need to count Saturdays differently, hence we must include Saturdays in the counting rule processing. Since you do not need other days in the rule, it is best to restrict the number of days processed by the rule to avoid performance issues.

Step 2: Create a new absence counting rule which deducts 0.5 days for Saturdays. You need to use the “Weekday” parameter provided with this rule scenario. Here, I am setting the deduction factor because a factor of 0.5 should be applied even if you request half day or a partial day absence.

Note: The “If” condition in this rule is optional because the rule is called only for Saturdays in the absence period. However, I would recommend using the “If” condition for better readability of the rule and if in future you want to modify the configuration and the rule, it's easier 😊.

Step 3: Assign the Absence Counting Configuration to the time type. The time type deducts in unit “Days”. Remember to mark the “Duration Display According To” field to Deduction Quantity when using absence counting rules cause otherwise you will wonder why the UI doesn’t display the quantity correctly 😉.

Note: I will skip this step for the rest of the examples as its repeated. You always need to assign the configuration to the time type. Do not forget this step 🙂 .

As you can see, Saturday is a half-working day as per the employee’s work schedule.

On creating a week's absence, 5.5 days are deducted from the time account instead of 6 days.

Here’s a look at the time account postings. As seen, only 0.5 days are deducted for Saturday instead of 1 day.

Example 2:

Since applying counting rules per weekday is a very prominent requirement from many customers, let me take another example:

An Employee works according to the following work schedule for 5 days a week with full day, half day and extended day. This is how the leave deduction should happen for each day.

Since, only Wednesday and Thursdays should be counted differently, you can use the following filters in the absence counting configuration.

This counting rule is called only for Wednesdays and Thursdays as absence days. You do not need an else condition because for the rest of the days, it should be the default deduction which is based on the planned working hours.

As you can see, the employee works extended days on Wednesdays and then half day on Thursdays.

This is how the absence deduction in days would look like for a week’s absence. As expected, 1.5 days are deducted for Wednesday and 0.5 days for Thursday.

Absence counting on non-working days

Typically, an absence on a non-working day is counted as 0 days. However, according to the social security and legal regulations in some countries, the disability leaves or certain illnesses shall be reported whenever the disability leave, or illness occurs regardless of whether it is on Off days, holidays, or workdays. For such cases, the disability leave should be counted as 1 calendar day instead of 0 days. These leaves also do not deduct from a time account but still should be reported as 1 day.

In our case, the deduction quantity field in the Employee Time object should be set to 1 day.

With this enhancement, it is allowed to request absences encompassing only non-working days or holidays for a clock-time user. This was not possible before the 2H 2023 release and resulted in an error on the UI whenever a clock-time user tried requesting absences including only non-working days. Why wasn’t it possible so far? The biggest dilemma was: What should be the start and end times for such an absence as there are no planned times defined in the work schedule for a non-working day?

The solution became clearer cause the start and end times are not really needed but to mainly be able to count the non-working day as 1 calendar day. That’s where the potential of absence counting was leveraged and at the same time able to record absence on a non-working day. The cool thing about counting rule is that you can even deduct half day for an absence on non-working day if you need to.

We made some fundamental changes to make it happen 🙂.

    • Introduced a new field in the Employee Time object called “Absence Duration Category” which has 3 values (Partial Day, Single Full Day, Multiple Day). This field is also reportable using SAP Analytics Cloud reporting.
    • Start times and end times are empty for an absence on a non-working day. That’s because there are no working times defined for a non-working day in the work schedule.
    • Absence Duration Category is set to “Single Full Day” for a single day absence on a non-working day and "Multiple Day" for a multiple day absence consisting only non-working days.
    • Partial day absence request is not allowed on a non-working day.

The configuration to enable requesting on non-working days remains the same. You need to enable the Requesting on Non-Working Days Allowed setting in the relevant time type.

Step 1: You need to process the days with planned working hours = 0 in the counting rule. Therefore, select the filter option “Include Planned Working Time Equals Zero”.

Step 2: Create the absence counting rule. You just need to set the deduction quantity to 1 if your time type unit is in “Days”. Again, the “If” condition is optional as only the days with planned hours = 0 are passed into the rule. However, for better readability of the rule, I have used the “If” condition.

Testing: Now let’s try it out. We will first request a single day absence on a non-working day and check the deduction quantity on the UI.

Now, let me request a multiple day absence which includes non-working day, working day and a holiday.
As seen, there is a full holiday on July 20th and non-working day on July 22nd.

If you request an absence from July 20th to July 22nd, 3 calendar days are counted.

Absence counting based on different shift classifications

There are times where you need to apply the absence counting rule depending on different employee groupings, subgroupings or classifications. One such classification which we leveraged for absence counting is based on the employee’s work pattern called “Shift Classification”. Shift Classification can be assigned to a “Work Schedule” or to a “Work Schedule Day Model”.


An employee group works 40 hours a week, but 4 days a week for 10 hours a day. Like their other colleagues, they have a leave entitlement of 20 days a year. The work schedule assigned to this employee group is assigned a particular shift classification.

A leave day for these employees is worth 1.25 days, that is, 1.25 days must be deducted from their leave entitlement for each leave day.

Step 1: We need to set each working day as 1.25 days instead of 1 day. Hence, we need to select all the days which are working days in the employee’s work schedule. Therefore, I select Monday to Thursday.

Step 2: In the absence counting rule, you can select the shift classification from the work schedule of the employee and set the deduction factor to 1.25 days.

Tip: If you have several work schedule shifts and want to deduct based on different shift classifications, you can define multiple if-else statements in your rule and set the deduction factor accordingly. Then, you might also need to include all weekdays in the configuration.

Testing: This employee is assigned a temporary work schedule from April 1st to April 15th which has a shift classification as shown. The employee works from Monday to Thursday for 10 hrs/day which is equivalent to 1.25 days.

A week’s absence deducts 5 days instead of 4 days.

The deduction per day from the corresponding time account is 1.25 days. I am taken aback by what this rule is capable of 🙂 .

Absence counting based on average values

Standard Weekly Hours are the contractual working hours defined in the Job Information of an employee. This can change depending on the changes in the employee’s contract over time. With absence counting rules 2.0, you can use the average contractual hours per week for absence counting instead of the regular working hours defined in the work schedule of the employee.

Example 1:

Employees in an enterprise work “flextime” with a weekly working time (fixed under collective labour agreements) of 37.5 hours. A single plant bargaining agreement determines that they should work 40 hours a week, however, the difference of 0.5 hours per day is credited to their working time account.

Now, if employees take leave, they should not be credited with 0.5 hours into their working time account. Instead of 8 hours (work schedule hours), only 7.5 hours (contractual hours) should be deducted from the leave types which are linked to the working time account.

Example 2:

A 'week' is defined as 7-day time frame with a maximum of 37.5 hours of working hours. A shift worker who normally works a roster with 12 hours working day still gets 7.5 hours deducted. You want to deduct hours based on FT equivalent/standard weekly hours for Part time employees which limits the maximum deduction to a certain set amount.

Let’s check how can we configure such a rule. I have used “Standard weekly hours” as the criteria in my example. You could also use FTE field from the Job Info to define your criteria.

Step 1: Each absence day should consider the standard weekly hours instead of the planned hours derived from the employee’s work schedule. You need to select all the working days where this deduction should apply. I have selected Monday to Friday as Saturday and Sunday are off days.

Step 2: In the rule, you need to navigate to the Job Information from the Absence Counting Rule Parameters and then select the field “Standard Weekly Hours”. In your if condition, select the value of the standard weekly hours. Then set the deduction factor. In this example, each day should deduct 7.5 days. The deduction factor is the multiplying factor with your normal working hours. If the normal working hours = 8, then 8*0.9375 = 7.5 hours. That’s how we get the deduction factor i.e., 8/7.5 = 0.9375.

You might wonder why I have not set the deduction quantity directly to 7.5 hours 🙂 . The reason is simple. If I had set the deduction quantity directly to 7.5 hours, it will work only for full day absences and not for a partial day absence. If you allow requesting partial day absence, it is better to set the deduction factor as the factor applies to the original planned working time.

Note: The time type in this case deducts in unit hours.

This employee has standard weekly hours as 37.5 hrs/week in his Job Info.

And the regular work schedule is 8 hrs/day.

As seen, a week’s absence deducts 37.5 hours instead of 40 hours. Isn't it cool ? Thanks to the absence counting rules.They are just so captivating 🙂

Per day deduction from the time account is 7.5 hours as expected.

Absence counting based on holiday work pattern

As you might know, we introduced the concept of Holiday Work Pattern (similar to “Day Types” in the SAP HCM On-Premise world) with the Public Holiday enhancements. You can assign a Holiday Work Pattern to employees who are supposed to work on a public holiday. For example: Nurses, Surgeons, or Policemen.

Typically, if an employee who is working on a public holiday takes an absence, then the regular work schedule hours are deducted. However, there are cases where you need to count the absence differently based on the holiday work pattern.


In an enterprise, employees receive an annual entitlement of five days for further training. For each employee, a time account of five days is created. The time type Further training is used to deduct from the time account.

Seminars are not normally held on public holidays. Some of your employees, however, must work on public holidays. You therefore do not want public holidays to be deducted from the time account for time type Further training.

Let’s look on how this example can be realized using absence counting rules.

Step 1: Select “Include Holidays” in the holiday selection field in the absence counting configuration object.

Let me remind you again on the importance of using the filters in the configuration. It is important that you only include the holidays for this use case as you only want to count the days with holidays differently. The rule is then processed only for the absence days which are holidays, and the UI is more performant.

Step 2: In the counting rule, you need to select the parameter Holiday Work Pattern under the Absence Counting Rule Parameters. Select the value of the holiday work pattern for which you want to deduct 0 days instead of 1 day which is normal when an employee works on a public holiday. Set the “Deduction Quantity” to 0 days.

The 26th January is a public holiday in India where this particular employee is supposed to work.

An absence of type "Further Training" created on this holiday deducts 0 days instead of 1 day as expected.

Absence on half holidays should count as full day absence

Sometimes, as per the company policies, you might need to deduct 1 full day if an absence covering the full remaining planned hours is requested on a half-holiday. However, this was not possible using the old Absence Counting Method by setting the “Consider Holidays” flag as “No”. This flag was simply not supported for half-holidays. The default deduction is 0.5 days if an absence was requested on a half-holiday. With the absence counting rules, it is now possible to override the default deduction. Amazing..I cant believe these rules are so robust and impressive 🙂 .

Let’s check how such a rule would look like.

Step 1: As usual, if we must process holidays in the rule, then include only the holidays by selecting “Include Holidays” in the field “Holiday Selection”.

Step 2: In the rule, we need to check if the holiday is a “half” holiday. This can be done with the use of “Holiday Category” in the “If” statement. In addition, we need to check if the full remaining hours are requested on a half-holiday and not partial hours. For this, we shall use the new field “Absence Duration Category”. It is set to “Single Full Day” if a full day absence covering the remaining hours is requested on a half holiday. One could also request a multiple day absence starting from half-holiday and ending the next day. In that case, the Absence Duration Category is set to “Multiple Days”.

Isn't it impressive to see how the new field can already be leveraged? I am sure you can use this field for many more use cases.

A full day absence on July 11th which is a half-holiday deducts 1 day instead of 0.5 days.


Now let’s check the results for a multiple day absence.

There is a half holiday on June 6th. Requesting a multiple day absence from June 6th to June 9th deducts 4 days and not 3.5 days.


Counting holiday in between absences

As per statutory rule in some countries, if employee applies an ‘Unpaid leave' for the days in between holidays, system should consider holiday also as an absence. Suppose May 1st is public holiday and employee applies leave from 30 Apr 2024 to 2nd May 2024 system should consider 3 days leave. This works with the Absence counting method if you use the ‘Consider Holidays’ field as ‘No’. However, these leave types usually don’t have any time account posting rule assigned and it’s not possible to use Absence counting method if there is no time account posting rule assigned. You might have used workarounds by assigning a dummy time account type to solve this. Thankfully, you do not need the dummy time account type anymore 🙂 .

Step 1: Absence Counting Configuration object needs to be created as below.

Step 2: Absence Counting Rule can be tweaked as per your requirement. If you want this rule to be applied for all holidays including partial holidays, you can skip the first “if” statement where we check if Holiday Category is “full”. If you need to apply this only for May 1st or only certain public holidays, then use the specific “Holiday Category” in the if condition. I have used the Absence Duration Category to check that the absence request is a multiple day absence and not a single day absence.

Again the "Absence Duration Category" comes in handy here as well 🙂 .

Step 3: If you want that employees are not cheating and want to avoid them requesting 2 single leaves in the above example, you can implement a take rule.

This is a simple rule wherein you can check if there a holiday in between 2 single day leaves, then do not allow the creation.

If you do not want to raise an error during leave cancellation, then please include “processing_action” in the “If” condition.

If I request a leave on 30th April, it raises an error because the next day is a holiday.

Similarly, an error is also raised for 2nd of May cause the previous day is a holiday.

The employee requests an absence including the bridging holiday. 3 days are deducted for this absence cause it counts the holiday as 1 day.


Integration to EC Payroll

One important aspect to consider is the replication to EC Payroll system. The absence deduction quantity modified using the absence counting rules in EC Time is not replicated directly to EC Payroll. The number of days and number of hours fields in Employee Time object which contains the planned working time duration are replicated to EC Payroll using the point-to-point replication. In case of partial day clock-time absences, only the start and end times are replicated. The duration is calculated from the original clock times minus planned unpaid break according to the planned working time in IT2003. The infotype framework logic then recalculates the fields (payroll hours (ABRST) and payroll days (ABRTG)) in IT2001 using the counting rules defined in the EC Payroll system. You therefore need to double maintain the counting rules in both the systems as of now to keep the payroll quantities and the deduction quantities consistent in both systems.

Let’s take the example where Saturdays should be deducted as 0.5 days as they are half working days with 4 hours planned. In ECP, you’ll need 2 rules with 2 different sequence numbers.

Below is the rule for counting all other days except Saturday.

The quota multiplying factor chosen is 100% for both unit "Days" and "Hours".

For Saturdays, in the counting rule only Saturdays are selected in the conditions for current day. Very similar to what we do with the business rule in EC Time .

The quota multiplier for unit ‘Days’ is 50% because the quota days should be deducted with 50% multiplying factor whereas the hours should be deducted as the planned hours hence 100% factor is used for unit 'Hours'. For example, if 4 hours is planned hours in your work schedule, you deduct 4 hours but 0.5 days.

A week’s absence from Monday to Saturday with Saturday as half-working day would have the “Quota used(ANZHL)” and “Payroll Days(ABRTG)” as 5.5 days.

As you've seen, the EC Time Absence Counting rules are much more flexible and easy to configure compared to the rules on the EC Payroll system. Technology advances 😉 .


Impact on Time Sheet

Lastly, you must check the impact on time sheet since the deduction quantity of the absence is not available in time valuation rules with this enhancement. Time valuation usually considers the absence quantity that is derived out of the scheduled working time.
Nonetheless, there could be use cases where time valuation needs to consider the absence deduction quantity and not the schedule working time quantity.
For example, an absence recorded on a non-working day for clock-timers can have a deduction quantity of 1 day but the quantity in days is 0 days. Time valuation considers this absence as 0 days because there is no start and end time for this absence. It might be required to consider 1 day in time valuation for this absence especially for hourly-paid workers.

Another example could be for the working time accounts. Employees work in an average 37.5 hours/week under collective labor agreements. However, as per their daily work schedule they work 40 hrs/week. Such employees get a credit of 0.5 hours into their working time account if they record 8 hrs/day in their time sheets. However, if an employee is absent, it should deduct 7.5 hours of absence and 0.5 hours should not be credited to the working time account because time valuation considers 8 hours as absence hours. As such, time valuation needs to consider the deduction quantity or ignore the absence during calculation.

If you have more such cases where you see the need of absence deduction quantity in time valuation, please feel free to write in the comments section. We can then take it up for future enhancements.


As you’ve seen, this feature significantly improves how you can count absences with the use of simple business rules. I hope that with the numerous example configurations I've explained in this blog, you can exercise your consulting expertise to fulfill the requirements around absence counting.

There’s one requirement called “Sandwich leave rule policy” which states that if an employee takes leave from Friday to Monday and Saturday, Sunday are off days, then 4 calendar days shall be deducted instead of 2 working days. For all other requests, work schedule days should be used. The scenario gets even more complicated if the employee takes single day leaves on Friday and on Monday. For that, you need to check if employee has already requested leave on Monday, then deduct 3 days if leave is taken on Friday, and vice-versa. You might be able to accomplish this by combining a take rule and an absence counting rule. Nevertheless, it is tricky to implement with the current absence counting rule because we have not exposed the lookup() function or any of the get_absence()…rule functions for retrieving existing absences and using them to apply the criteria for counting absences. You might wonder why these aren’t available. It’s because the rule is day-based, and these functions require database access, making them inefficient for day-based processing. We must approach this requirement differently 😉. That’s the reason it was excluded with this enhancement. If you have this requirement, please write in the comments. I’d also like to know if you discovered a good workaround with the absence counting rule and a take rule to raise an error if single days are requested without including the weekends in between.

Furthermore, there are several rule functions such as add(), divide(), math(), modulo(), round(), Get Number Of Calendar Days(), Day Of Week() etc. which can be used. The round() function is helpful when you need to round the absence deduction amount to the next decimal figure. The Day Of Week() rule function may be used in cases where conditions must be applied based on the day of the week the absence begins or ends. As an example: In the sandwich leave rule, if the absence begins on Friday and ends on Monday, set the quantity to one day for weekends.

Finally, as we draw towards the end, I sincerely hope this blog facilitates you in implementing the requirements by utilizing the flexible Absence Counting Rules 2.0. Please click the like button if you enjoyed reading it 😊.

Feel free to provide your input in the comments if you have any additional requirements that cannot be fulfilled with absence counting rules 2.0.

Thank you and see you again next time 🙂 .