When tracking target hours using the Cross-Application Time Sheet system (CATS), it is impossible to know whether an employee worked a day, evening, night, or holiday shift. This information can be a vital part of determining overtime pay or shift bonuses. The author shares a convention he developed to display shift information by enabling a CATS user exit.
Let’s say you use the Cross-Application Time Sheet system (CATS) to manage employee and contractor time. The transaction you would use to enter time would be CAT2. When you enter time using CAT2, you have a display of target hours planned for the day. Target hours are hours that an employee or contractor is supposed to complete that day.
For example, an employee who works Monday through Friday for eight hours a day will have eight hours as a target for Monday through Friday and zero hours for Saturday and Sunday. This appears as a total number of hours for each day at the top of the entry cells for that day (Figure 1).

Figure 1
Standard CAT2 screen
Sometimes it is important to know what the person’s target hours were on a certain day – for example, to determine whether the employee is eligible for overtime. An employee working 10 hours on an eight-hour day is eligible for two hours of overtime. An employee working eight hours on a public holiday may be eligible for eight hours of overtime and eight hours of holiday pay. In addition to knowing the target hours for shift workers, it may even be important to know what shift they were on, because that might make them eligible for shift bonuses.
The target hours information is based on the person’s work schedule rule and any substitution that he/she may have. (A substitution is entered as infotype 2003 and records a change in the daily work schedule for the date range entered.)
In standard SAP, while you can see the target hours in the CAT2 transaction, it is not possible to know whether the target hours are planned as a day, evening, or night shift. It is also impossible to know whether the day is a public holiday. Although it is not widely known and not covered in the SAP documentation, you can display this information quite easily through a few lines of code written under the CATS user exit CATP0001. This user exit is available to you only if you are on SAP Release 4.6A or higher.
Note
The display of the target hours line can be turned off or on with the target hours button on the entry screen; therefore, you may not see them on your screen when you check.
With this user exit enabled, the CATS screen looks like what you see in Figure 2.

Figure 2
CAT2 screen with user exit enabled
A simple-to-remember convention is used to convey the shift and holiday information:
- A .03, .02, or .01 after the target hours means day, night, or evening shifts, respectively.
- A .13, .12, or .11 after the target hours means day, night, or evening shifts, respectively, on a holiday.
- A .10 after the target hours means a holiday on a day off.
You are able to choose your own convention – and adjust the code accordingly.
If you have set your CATS profiles to check the entered hours against target, it is these revised values that will be used for the validation. Since these are small numbers (.01, .02, .03, etc.), it should generally make little or no material impact in most cases.
I’ll show you the code that makes this possible, but first, it is essential to use daily work schedule attributes to designate day, evening, night, or off shifts.
In the code shown below, the user has chosen to name the daily work schedules with the following convention:
|
Day
|
|
Dnxx
|
|
Evening
|
|
Enxx
|
|
Night
|
|
Nnxx
|
|
Off
|
|
FREE
|
“n” is any digit from 0 to 9 and “xx” is the target hours (assumed only whole hours, e.g., eight, 10, and 12) per day. (If the target hours are not whole hours, this convention does not work.)
For example, D108 could be a daily work schedule that represents a day shift for 8 hours. A daily work schedule convention is an effective way of connecting the person's shift information with his/her target hours. The program has access to the daily work schedule of the employee and can modify the target hours accordingly. If the daily work schedule starts with a D and the target hours for that day are 12, then the program changes the target hours to 12.03.
Daily work schedule configuration is done through IMG menu path Personnel Time Management > Work Schedules > Daily Work Schedules > Define Daily Work Schedules. This menu path takes you to the overview screen shown in Figure 3. Click on New entries to create a Daily work schedule. That takes you to the detail screen shown in Figure 4.

Figure 3
Configuring daily work schedule - overview

Figure 4
Daily work schedule detail
These daily work schedules need to be attached to period work schedules, and period work schedules need to be referenced by work schedule rules through standard Time Management configuration that is not covered in this article. Work schedule rules describe the work pattern of each employee, day by day. A work schedule rule for an employee can be found in his/her infotype 0007 record.
The code shown in Figure 5 “interprets” the daily work schedule and the holiday calendar. It assigns the required target hours as per the convention discussed above. The code is placed in the SAP- delivered user exit CATP0001. This user exit can be found in transaction SMOD. Enter the name of the exit (CATP0001) in the Enhancement field and click on Documentation for further information.

Figure 5
Code to interpret daily work schedule and holiday calendar
If the daily work schedule does not begin with “D,” “E,” or “N,” it is outside the design criteria and possibly in error, according to the convention I adopted for this article. This program then displays the target hours using .99 or .88 (on a holiday) to make it conspicuous enough for correction.
Deepankar Maitra
Deepankar Maitra has more than 25 years of consulting experience specializing in SAP-based solutions for human resources, supply chain, and reporting in multi-national companies around the world. He has successfully directed large implementation projects as solution architect, delivery manager, global lead, and country lead. His expertise lies in pragmatic harmonization of data and synthesis of processes using tools that improve process execution through quantum leaps in productivity.
You may contact the author at deepankar.maitra@accenture.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.