Time Sheet Workflow Based on Time Valuation Results
We often receive the question to have a workflow based on different time valuation results. Most of them might not be aware that the time sheet workflow does not only handle simple cases like triggering a workflow to a manager, HR but can now also handle complex situations where you decide which workflow should be triggered based on a time valuation result like Overtime values
In this sample case, let me take an example of the following scenario
- 0 overtime hours –> should trigger no workflow
- 1-5 overtime hours –> manager approval
- 6-20 overtime hours –> manager and HR
To handle, this I will make use of a sample duration-based time recording profile (DUR_POS) for illustration purposes. Please note, you can make use of any time recording profiles as long as you capture the overtime values in a time type group as part of the time valuation that you have
Sample Time Recording Profile
In the above time recording profile, we are basically splitting Recorded time in Public Holiday group and then in Non PH Group.
In the final valuation we take the recorded hours on working days and compare it with scheduled working day for that day. Anything in access is moved to a time type group “OT1.5_WK”
Note: Again, This is just a sample time valuation. Your OT calculation could differ from mine. The basic idea is to capture OT , be it on a Public Holiday, Non-working Day (Sun, Sat) , working Day etc in a time type group. As an example, for demonstration, I am taking OT hours which are in Non-Public Holidays, but you could calculate for a full week or so.
Construct a workflow rule like below and attach it to Employee Time Sheet Object Definition
The Rule Does the following
- The rule function “Get Number of Valuated Hours For Time Sheet ()” uses Time type group as a parameter. The Time Type Group OT1.5_WK is used here. The will retrieve the OT value from time valuation in time sheet when Workflow is submitted
- Based on the value of this time type group appropriate workflow is triggered i.e. either to manager or manager & HR etc
- The other conditions checks if the action is submit and current approval status is “To be Submitted “.
- Further conditions can be added like, legal entity, Time Recording profiles, Employee Group/Class etc if you further want to differentiate Overtime calculation and values for different employee groups
For a particular week, the OT value is 6 hours
So, Workflow triggered is “Manager and HR”
OT is 2 hours
For 2 hours, workflow is triggered to manager only
Some limitations where this will not work:
- If your time type group (TTG) is a time collector, this will not work. Ensure that your TTG is not a collector
- This will not work if you are using time type group value in rule which is part of time valuation “Filter Input groups ….” Ensure you use the TTG from valuation like “Aggregate and split ” or “Deduct groups from input groups…”
With this, I believe you can make use of these concepts to derive a workflow based on any time valuation result. Hope this helps in your implementation projects
Product Management, SAP Best practices for SuccessFactors
thanks a lot Neelesh Kamath very fruitful blog
Very informative blog, thanks.
That workflow - is that functionality from within SuccessFactors or SAP Cloud Workflow?
Thanks, Clemens. This is Successfactors workflow
thank you for the above solution. Do I understand correctly that this solution does not require Time Tracking Licenses? Thank you very much.
Thanks for the feedback.
Yes this rule function is available for normal time sheet as well
Trying to configure above solution and having difficulties on the business rule on get number of valuated hours for time sheet block.
I'm able to see in the timesheet UI via trace button that the time time groups' values are different than Zero, but in the rule trace logs, following to function "'getNumberOfValuatedHoursForTimeSheet' it fails and compares Zero with the threshold number in the rule. (So get number function's result comes as zero).
So my question is, is the time type group assigned to the business rule a time collector? Would you be able to advise how to resolve and get the number of valuated hours? Should the time type group be configured in a certain way?
Thanks in advance.
Sorry for late response as I was on vacation last week.
For me, it works with normal time type groups which is OT (with calculated time as category). I dont have a collector.