Human Capital Management Blogs by SAP
Get insider info on SAP SuccessFactors HCM suite for core HR and payroll, time and attendance, talent management, employee experience management, and more in this SAP blog.
cancel
Showing results for 
Search instead for 
Did you mean: 
NeeleshKamath
Product and Topic Expert
Product and Topic Expert
2,870

Overview:


 

Frequently we come across customer cases where an alert has to be sent to the manager upon crossing a certain overtime value in a year. We are already aware that these alerts are possible already in a weekly time sheet with help of collectors like daily, monthly etc but the added complexity in this requirement is to check a cumulative overtime value for an year and send an alert. Currently we do not have a yearly collector and hence I am going to suggest couple of workaround solutions to achieve this requirement

Disclaimer: This is a workaround approach and one of them involves 2 Integration Center processes. So kindly adapt, test from your end before going live with this solution

Solution Overview


 

This solution involves two Integration Center files and a Custom MDF

  • 1st Integration center: To move overtime hours from employee’s time sheet to Adhoc Accounts tied to a single time type. Also, these Adhoc accounts belong to same time account type. The idea is to then read the balance of this time type and if it is greater than say 220 hours , the alert is sent to the manager

  • Custom MDF : A custom MDF to track the OT balance and send alerts

  • 2nd Integration center: This is a mapping between User Entity and a Custom MDF. Each time this IC runs, a record is created/updated for a user with his/her current OT balance and an alert is sent if the threshold of 220 hours is breached. In this example, lets assume the threshold overtime limit for a year is 220 hours


IC 1 and 2 can have filters to ensure only the selected group of employees and recently modified records are run

 

Solution 1


 

Use this solution only if you have already used TOIL and working time account for your primary requirement. I will also share my thoughts on using TOIL/Working time account in Solution 2.

The first part of Solution 1 is to create an Adhoc time account type and Move the Overtime hours from Daily Time collectors to these accounts



For the first IC , just follow this blog

https://blogs.sap.com/2021/04/30/employee-central-time-off-multiple-time-off-in-lieu-toil-solution/

There are only two changes which needs to be carried out w.r.t above blog

  • Move Overtime not just for public holidays but also for working days to adhoc accounts.

  • The bookable end date of every adhoc account should be set to the year end of that year i.e Dec 31st This can be done via a Calculation on bookable end date field


 


The next step is to create a custom MDF as shown below


The User field is mapped to externalCode of MDF

Cust_OT_Hours will store the cumulative overtime for that year

Cust_Alert_Sent will track if an alert has to be sent or not

Next create an On Save rule to perform these calculations to check if overall OT is crossing 220 (threshold) or not



 

 

The above rule also takes care of new hire proration. If employee joins say mid of an year, the threshold value of 220 is prorated accordingly and the cumulative yearly overtime value is checked against this prorated threshold value

Next, create a workflow and an alert rule attached to onPost Save of the Custom MDF.



The final step is to create and IC where starting entity is “USER” and the target entity is “Custom MDF”

This is an SF to SF ODATA IC


Ensure that the field “User ID” from User Entity is mapped to field “externalCode” of custom mdf as shown above

Add appropriate filters as required based on country, employee group etc to filter only those employees that are required for this alert.

Testing


 

First ensure that the IC for creating Adhoc account is run first followed by IC to create/update the MDF

I will just show case the second IC part here because working of first IC is explained in detail in the blog I shared above

Let’s say the employee has already a balance more than 220 hours as of today


Now run the IC for the employees


After the IC is run successfully, the MDF is created/updated, and an email is sent to employee’s manager



Some important things to note for solution 1

  • Since you are moving overtime not just for public holidays but also for weekdays, there could be a lot of adhoc accounts created per employee. Hence it is necessary to close these accounts at the year end , else the time account workbench UI can get clogged up with lot of time accounts. You can use automated period end processing to close these accounts at year end to ensure a smooth process.

  • Since the number of accounts per employee can be huge, please schedule these IC jobs during non business hours


 

Solution 2


 

Instead of adhoc accounts, you can also use the standard TOIL /Working time account to carry out this. If you are not using TOIL account for anything else, you can make use of that and assign a TOIL account to the time profile

Example of a TOIL account


 

Once this is done, ensure that in your time valuations, you move the overtime to this account for all days.

Next you can just follow the steps from Integration Center 2 (IC 2) and custom MDF from Solution 1. You don’t need IC1 for this approach. Just ensure to replace the time type with this TOIL time type in the onSave rule used by the custom MDF and you are good to go

 

That’s it w.r.t this blog. Hope you find this valuable for your implementation. Please ensure you test this thoroughly for a larger group of employees before deploying this for your customer

 

 
5 Comments