Symptom
- The requirement is to stop the user from submitting timesheet if the time sheet has a time off pending for approval.
- How to stop the user from submitting timesheet if the time sheet has a time off pending for approval
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP SuccessFactors Employee Central - Time Sheet
- SAP SuccessFactors Time Tracking
Reproducing the Issue
- Create leave, and submit for approval
- Leave status is pending
- Submit the time sheet
- It is expected such a time sheet with a pending absence within the time sheet period cannot be submitted.
Similar expectation may also hold true for pending cancellation absences.
Cause
By current design, only pending Single Record Approval may block the capability to submit time sheets.
This is documented in Results section in help document Setting Up Single Record Approval .
Resolution
A custom rule set as Save Rule on Employee Time Sheet object definition may help to achieve this by raising an error message to block the submission, when there is a pending absence during the period of the time sheet.
A sample may look like below, which rule would block the submission when there is pending approval or pending cancellation approval absence during the period of the time sheet.
With above sample business rule, error message will be raised when submitting a time sheet, within which time sheet period there is a pending approval or pending cancellation approval Sickness leave request.
The idea behind is to raise error if there is any pending or cancellation pending Employee Time objects with the relevant absence time type of the time sheet owner that overlaps the current time sheet period.
It requires a pair of lookup() nodes to do the validation like highlighted in above screenshot for each time type - approval status combination.
Attention! Above is only a sample provided and it is requires consulting team's activities to really set up the business rule according to your business requirement in detail.
See Also
Setting Up Time Valuations That Prevent Time Recording
Keywords
employee time sheet, waiting, approve, pending, timeoff, leave, absence, record, submit, cancellation, employeetimesheet, tracking, block, stop, prevent, monthly, month, flexible, legacy, week, bi-weekly, sra, single, record, approval , KBA , LOD-SF-EC-TMS , Time Sheet , LOD-SF-TTR-TMS , Time Sheet , LOD-SF-EC-TIM , Time Off , How To
Product
Attachments
Pasted image.png |
Pasted image.png |