logo

Are you need IT Support Engineer? Free Consultant

Calculating Legal Mandatory Hours in SAP SuccessFa…

  • By Sanjay
  • 13/06/2026
  • 20 Views


This blog was written in collaboration with @SohamChaudhury. The solution described here was researched, designed, and validated together during a live customer implementation.

You are configuring SAP SuccessFactors Time Tracking for a customer in Hungary. The business asks for Legal Mandatory Hours – a statutory figure required to calculate overtime under the Hungarian Working Time Frame model. This blog documents how we analysed the requirement, understood why the standard SuccessFactors approach falls short, and built a working solution using a chain of Time Valuations – entirely from scratch.


What Are Legal Mandatory Hours?

Unlike most countries where overtime is assessed daily or weekly, Hungary allows employers to define a Working Time Frame – a rolling evaluation period of up to four months. Overtime is assessed only at the end of that frame, not day by day. This means you cannot simply say an employee worked 9 hours on a Monday and flag 1 hour as overtime. What matters is the total at the end of the frame.

To evaluate overtime, you need a legal target: how many hours was the employee legally required to work during that frame? That target is the Legal Mandatory Hours. Critically, it is not derived from the employee's personal work schedule – it follows a statutory formula defined in the Hungarian Labour Code (Act I of 2012).

Graphic_1_Formula.png

Figure 1: Legal Mandatory Hours – the statutory calculation formula

The formula applies the same baseline to every eligible full-time employee – a standard Monday-to-Friday, 8-hours-per-day calendar, adjusted for the Hungarian government's official annual workday decree.

The concept in one sentence: Legal Mandatory Hours are the legally required working hours for a given frame, and they serve as the baseline against which actual worked hours are compared to determine overtime.


The Bridge Day Complication

Each year, the Hungarian government publishes an official decree that reshuffles certain working days and rest days. A Friday before a long weekend may become an official rest day – a bridge off day. To compensate, a Saturday elsewhere in the year becomes an official working day. The two do not necessarily fall in the same month.

Graphic_2_Bridge_Day.png

 Figure 2: How government decrees change the working/rest day pattern


Why the Standard SuccessFactors Approach Does Not Work

The natural instinct is to use the Time Category Scheduled Working Time inside a Time Valuation. But this reads from the employee's assigned work schedule – not from a statutory formula. If employees have different schedules, outputs diverge. More critically, there is no built-in Time Type Group or Time Category that handles bridge day logic or the official Hungarian government calendar.

No standard configuration exists
There are no SAP best practices or readily available solution for this specific requirement of Hungary. The solution had to be engineered from first principles using Time Valuations with the Create Time Record valuation type.


The Solution: A Chain of Nine Time Valuations

The solution uses nine Time Valuations in sequence. Each one builds on the output of the previous, progressively creating, filtering, and adjusting the total until the final Legal Mandatory Hours figure is produced for the entire Working Time Frame.

Graphic_3_Tv_Chain.png

 Figure 3: The complete Time Valuation chain


Configuration Walkthrough

Before you begin, two prerequisites must be in place in the Holiday Calendar for every calendar year:

  • Bridge working Saturdays must be entered with Holiday Category = NONE. This is a mandatory annual maintenance activity.
  • Bridge off days (Fridays) must be reflected by assigning a dedicated Day Model and Shift Classification for affected employees on those dates. We used the code ‘OFF_BD' for both. This will need to be assigned to the employees using Temporary Time Information.

Dm.png

 Figure 4:  Work Schedule Day Model for Bridge Off Days

Step 1 – Create 8h Time Record for Every Calendar Day (TV 1)

Use Valuation Type Create Time Record with a fixed duration of 8 hours and no weekday or date filter. This creates a raw 8-hour record for every single day in the settlement period. It is the foundation of the entire chain.

Tv1.Png

 Figure 5: Time Valuation – Create Time Record, 8h every day 

Step 2 – Identify Bridge Working Saturdays (TV 2)

Create a Time Record Filter with Weekday = Saturday and Current Day Holiday Category = NONE. This isolates only the Saturdays the government has officially designated as working days for that year.

Trf2.PngFigure 6: Time Record Filter – Saturday + Holiday Category = NONE

Tv2.PngFigure 7: Time Valuation – Identify Working Saturdays

Step 3 – Identify Bridge Off Days on Mon–Fri (TV 3)

Create a Time Record Filter with Weekday = Mon-Fri and Current Day Shift Classification = OFF_BD. This identifies and captures the working days that have become official rest days.

Trf3.Png

 Figure 8: Time Record Filter – Mon-Fri + Shift Classification = OFF_BD

 

Tv3.Png

Figure 9: Time Valuation – Identify Bridge Off Days

Step 4 – Filter Mon-Fri Base Hours (TV 4)

Apply a Time Record Filter with Weekday = Monday to Friday against the TV 1 output. This gives the raw 8h × Mon-Fri total before any bridge day or holiday adjustment.

Trf4.PngFigure 10: Time Record Filter – Weekday = Monday to Friday

Tv4.PngFigure 11: Time Valuation – Mon-Fri Base Hours

Step 5 – Deduct Bridge Off Days (TV 5 = TV 4 – TV 3)

Subtract the TV 3 output (bridge off day hours) from the TV 4 output (Mon-Fri base). The result is the adjusted Mon-Fri total with bridge rest days removed.

Tv5.PngFigure 12: Time Valuation – Deduct Bridge Off Days from Mon-Fri Base

Step 6 – Add Working Saturdays (TV 6 = TV 5 + TV 2)

Add the TV 2 output (bridge working Saturday hours) to the TV 5 total. The result now covers the adjusted working hours before public holidays are considered.

Tv6.Png

Figure 13: Time Valuation – Add Bridge Working Saturday Hours

Step 7 – Identify Public Holidays on Mon–Fri (TV 7)

Create a Time Record Filter with Weekday = Mon-Fri and Current Day Holiday Category = FULL. This isolates official public holidays falling on working days.

Trf7.PngFigure 14: Time Records Filter- Mon-Fri + Holiday Category = FULL

Tv7.PngFigure 15: Time Valuation – Identify Public Holidays on Mon-Fri

Step 8 – Deduct Public Holidays (TV 8 = TV 6 − TV 7)

Set Valuation Type to Valuate Per Day and subtract the TV 7 output from TV 6. This gives the daily Legal Mandatory Hours figure with all adjustments applied.

Tv8.Png

Figure 16: Time Valuation – Deduct Public Holidays (Valuate Per Day)

Step 9 – Accumulate for the Working Time Frame (TV 9)

Use a Container Time Valuation to aggregate the TV 8 daily output across the full Working Time Frame – in our implementation this was three months. The output is the Legal Mandatory Hours for the entire frame.

Tv9.PngFigure 17: Time Valuation – Container for Working Time Frame Period

 

Calculating Working Time Frame Overtime

With Legal Mandatory Hours in place, the overtime calculation itself is straightforward. Add further Time Valuations to sum the employee's actual recorded working time over the same Working Time Frame, then subtract:

Actual Hours Worked (Working Time Frame) Sum of all recorded working time across the frame
minus  Legal Mandatory Hours TV 9 output from the chain above
= Overtime Due If positive, this is payable Working Time Frame overtime

Key Learnings

  • Holiday Calendar maintenance is an annual activity. Bridge working Saturdays in the holiday calendar for each year must be entered before the year begins. Missing this will produce incorrect Legal Mandatory Hours for the entire year.
  • The Day Model OFF_BD is essential. Creating a dedicated Day Model and Shift Classification with the code OFF_BD is the mechanism that allows Time Valuations to precisely identify bridge off days – there is no other standard filter option for this.
  • Holiday Class drives behaviour – not just the date entry. Holiday Category = FULL deducts hours. Holiday Category = NONE tags a date without blocking the timesheet. Understanding this distinction is fundamental.
  • Do not use Scheduled Working Time for this calculation. It reads from the employee's personal work schedule. Legal Mandatory Hours must be uniform across all full-time employees in the same frame, regardless of individual schedule.
  • Separate Time Valuations for each adjustment. Handling bridge days and public holidays in dedicated steps (rather than combined filters) makes the chain traceable, testable, and easier to maintain.

Conclusion

SAP SuccessFactors Time Tracking has no out-of-the-box answer for Hungary's Legal Mandatory Hours requirement. But the platform's flexibility – specifically the ability to chain Time Valuations with precise filters – gives you everything you need to build a fully compliant solution. The nine-step chain described here has been tested and confirmed in a live Hungarian implementation.

If you are working on a similar requirement, or if you have solved it differently, feel free to share your approach in the comments. Good luck with your implementation.



Source link

Leave a Reply

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