The EU Working Time Directive mandates a minimum 11-hour rest between two consecutive working periods. SAP SuccessFactors Time Tracking supports Rest Rules that highlight violations on the timesheet and can block submission (KBA 3323455).
But both act at the timesheet level. The employee can save non-compliant entries all week – and only find out at submission.
The Idea
Two building blocks:
- A valuation step that writes each day’s actual clock-in/clock-out into a Time Container.
- A validation rule on the Time Recording Profile that reads adjacent days from that container on every save, calculates the rest gap, and raises a hard error if it falls below the threshold.
Building Block 1: The Time Container
We need the validation rule to know when the employee actually started and stopped working on adjacent days. A Time Container makes this possible.
Input Group
A time type group containing all attendance types that count as actual working time.
Output Group
A time type group with Time Container Type = Yes. This is what the rule will query.
Valuation Step
Aggregate Input Groups and Split, Valuate Per Day, Threshold = 0. All attendance records are aggregated into the container, storing the earliest start and latest end per employee per day.
Building Block 2: The Validation Rule
A business rule assigned as a Validation Rule on the Time Recording Profile. It fires on every record save.
Variables
The rule uses Lookup(Time Container) to fetch the previous day’s end time and the next day’s start time. Current-day times come from the record being saved.
Backward Check – Previous Day
Did the employee rest enough between yesterday’s last clock-out and today’s clock-in?
The rule calculates the gap in seconds. If < 39,600 (11 hours) – error, save blocked.
An overnight detection is built in: if the previous day’s end time is numerically smaller than its start time, the shift crossed midnight, and the DateTime construction adjusts the calendar date accordingly.
Forward Check – Next Day
If tomorrow is already recorded, does today’s clock-out leave enough rest before tomorrow’s clock-in?
Same logic, reversed direction. Same overnight handling.
The Error
Raised with Error severity – the record cannot be saved.
Quick Example
| Monday | Tuesday | |
| Saved entry | 08:00 – 19:00 | 04:00 – 12:00 |
| Rest gap | 19:00 → 04:00 = 9 hours | |
| Result | Saved | Blocked (< 11 hours) |
Employee adjusts Tuesday to 06:00 – 12:00 (gap = 11h). Save succeeds.
At a Glance
| Standard Rest Rules | This Approach | |
| Blocks at | Timesheet submission | Record save |
| Feedback | End of period | Immediate |
The two are complementary – standard rest rules for visual indicators, this approach for hard enforcement at entry.
Worth Noting
- The rule checks against already saved adjacent days. If the adjacent day has not been recorded yet, the lookup returns null and the check is skipped.
- 39,600 seconds = 11 hours. Adjust to match your regulation.
- Test overnight shifts thoroughly – they are the trickiest edge case.
Source link


