Technical Articles
Consuming One Time Type Before Another-Managing Time-Off Dependencies
Hello,
In Time Off, we often get requirement of ‘Time Type Dependency’,i.e, to be able to avail a time (leave) type only after consuming another one.
For example, an employee can avail Sick Leave – Unpaid only after consuming Sick Leave – Half Paid.
This can be supported with “Calculate Balance for Types()’ Function.
As per help.sap.com, short about this function-
- It calculates the balance based on a given time type or time account type for a target user on a specific date.
- It can be used in a Take rule, because the base object is EmployeeTime and you can pass the external code of the time type.
- If multiple accounts are selected on that date, the balances of all accounts will be accumulated.
-
For the parameter of external codes, more than one time (account) type is added.
-
For a time account type there are two recurring time accounts bookable on the calculation date passed to the rule.
-
There is more than one time account type assigned to the time type.
-
- The system considers all postings up to the date. However, when using the rule function based on time types there is an additional dependency on the value defined for time type field Balance Calculation Setting. If set to “Consider bookings after calculation date” the rule function also considers later postings.
-
Limitations
-
This rule function does not consider accrual simulation even if it’s activated for the time account type.
- This rule function calculates the balance based on the information stored in the database already. For example, when using the rule function in an absence validation rule, it does not consider postings of the employee time the user is about to create.
-
Basis definition above, lets create rule basis example stated.
The example – an employee can avail Sick Leave – Unpaid only after consuming Sick Leave – Half Paid.
Below is the rule –
Use ‘Absence Validation’ Rule Scenario.
Business Rule
Please note that Take Rules are created for ‘Negative Scenarios’.
The above rule depicts that only if balance of Sick Leave – Half Paid is more than 0 (i.e positive balance) then error should be triggered.
That means, employee will be able to avail Sick Leave – Unpaid, only after Sick Leave – Half Paid quota is over.
With above rule, we can have multiple ‘If’ conditions, to start with function, below are the parameters updated-
Date – EmployeeTime.StartDate will check the date as of which employee is applying for leave.
Selection Type – This has two options – Time Type and Time Account Type, either of them can be selected, as per requirement
User – The user for which this rule should be applicable (target user). by selecting Employee Time.User, it gets applicable for all employees.
External Code for Time Type or Time Account Type – This is text field. To type the external code of the time (leave) type, which should be consumed first!
This rule will be placed in ‘Sick Leave-Unpaid’.
With this, whenever an employee tries to avail Sick Leave – Unpaid, system will check if Sick Leave – Half Pay is fully consumed and act likewise.
Hope this helps!
Any feedback would be helpful.
Hi Jyotika,
Thanks for the blog, usage of such functions are really helpful to control data entry; having said that, I fail to agree the business case because paid and unpaid are payroll criterion not time offs.
Before deciding, I would ask following questions to myself:
Shouldn't it be the payroll system prorate the pay.
Example: The 90 days’ sick leave can be continuous or intermittent, and the salary is paid as follows:
If the above example is the scenario, then Employee Central Payroll will use partial period factoring to calculate the pay. If it's not ECP, you create custom fields as counter and run interim accounts to populate those counters and send to payroll system for sick leave pay calculation.
This way it will reduce burden from employee, manager or HR in maintenance of data.
Regards
Prasanna
Hello Prasanna,
Thank you for the feedback.
I understand and agree with your point of view.
Motive of this blog is the understandability of function provided only.
Hope this suffices.
Regards
Jyotika
Hi Jyotika Karnani
It's good to know how time quotas are handled within SF. A few months ago, while delivering HR306 training, I came across such (and some other) scenarios, in on-prem Time Admin, and I was wondering how it's done in Time-Off functionality. Came across your blog at the right time. Thanks for sharing 🙂
Thank you Faisal Iqbal for relating with the functionality.
It motivates 🙂
Regards