logo

Are you need IT Support Engineer? Free Consultant

Enforcing Minimum Rest Period at Record Save in SAP SuccessFactors Time Tracking

  • By Sanjay
  • 25/09/2026
  • 7 Views



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.

What if we block it right when they hit Save?

The Idea

Two building blocks:

  1. A valuation step that writes each day’s actual clock-in/clock-out into a Time Container.
  2. 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.
Rest_Period_Architecture_Professional.png
Fig. 1 – Solution Architecture Diagram

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.

Image 1.Jpg
Fig. 2 – Attendance time type group and its members

Output Group

A time type group with Time Container Type = Yes. This is what the rule will query.

Image 2.JpgFig. 3 – Output group with Time Container Type enabled

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.

Image 3.JpgFig. 4 – Aggregation valuation step

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.

Image 4.JpgFig. 5 – Variable definitions: Time Container lookups and date arithmetic

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.

Image 5.JpgFig. 6 – Previous-day rest gap check with overnight handling

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.

Image 6.JpgFig. 7 – Next-day rest gap check with overnight handling

The Error

“A minimum rest period of 11 hours is required between two working periods. Please review and adjust your time entries.”

Raised with Error severity – the record cannot be saved.


Quick Example

 MondayTuesday
Saved entry08:00 – 19:0004:00 – 12:00
Rest gap 19:00 → 04:00 = 9 hours
ResultSavedBlocked (< 11 hours)

Employee adjusts Tuesday to 06:00 – 12:00 (gap = 11h). Save succeeds.


At a Glance

 Standard Rest RulesThis Approach
Blocks atTimesheet submissionRecord save
FeedbackEnd of periodImmediate

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

Leave a Reply

Your email address will not be published. Required fields are marked *

Chat with us on WhatsApp!