Providing and Checking Time Data

Objective

After completing this lesson, you will be able to provide recorded time data for time evaluation and run error checks.

Provision and Verification of Time Data

Funnel-shaped flowchart showing steps in time management process, with Provide time data highlighted.
Diagram explaining processed time data in schema TM00 with functions P2011, P2001, and P2002; including planned working time, absence, and attendance

Time data in TM00 is provided using the following functions:

  • P2011

    Imports the employee's planned specifications to the internal table TZP and the pairs formed from the time postings to the internal table TIP

  • P2001

    Imports the absences from the Absences infotype (2001) to the TIP table

  • P2002

    Imports the attendances from the Attendances infotype (2002) to the TIP table

  • PTIP TD80 GEN

    Provides the attendance and absence reasons

Funnel-shaped flowchart showing steps in time management process, with Tolerances and Error Checks highlighted
Image illustrating Rule TE10 for adjusting absences with two scenarios showing clock-in/out times affecting absence periods and message prompts

The TE10 personnel calculation rule compares the absences of less than one day with the day's attendances.

If the position of the partial-day absence results in a period of time with undocumented time, time evaluation enters a note or error in the error table. If attendances and absences overlap, time evaluation uses the INSTP operation to adjust the absence in line with the position of the attendance.

Hint

The original record in the Absences infotype (2001) is not updated in the process.

The TE10 personnel calculation rule is called by the PTIPA function.

Decision tree for TE20 Error Checks detailing daily work status, employee presence, absence, and day types (paid work, paid off, unpaid off)

The TE20 personnel calculation rule checks whether employees have to be at work on certain days, or if they are not permitted to be at work (illness, public holiday, leave, and so on). An error is generated if, for example, an employee is absent without permission.

To obtain results for a paid public holiday (for hourly wage earners, for example), the system generates a TIP entry based on the planned working times in the daily work schedule (planned pair).

If an absence has been recorded on a public holiday, you can use the TE21 personnel calculation rule to define whether this day is evaluated as an absence or as a public holiday.

The TE20 personnel calculation rule is called using the ACTIO function.

Illustration depicting error checks for time pairs: complete pair, clock-in missing, clock-out missing, and recalculation based on work schedule

Pair formation assigns each pair a status, which defines whether a time pair was able to be formed correctly.

The TE30 personnel calculation rule carries out error checks for each TIP entry being evaluated. Depending on the missing posting (clock-in, clock-out, end of off-site work), it effects the following actions:

  • It issues an error message and terminates

  • It checks whether the employee could still make the posting theoretically, since the end of the planned working time has not yet been reached or lies in a tolerance interval defined by the DELIM constant. You can use the DELIM constant (constants table T511K) to define the duration within which a missing clock-out entry is automatically replaced by the end of planned working time; this happens as of the end of the planned working time.

  • It uses the DELIM operation to delimit the open pair with the start or end of the planned working time. The day is evaluated provisionally, and a recalculation is set.

The TE30 personnel calculation rule is called by the PTIP function (process internal table TIP).

Hint

  • As an alternative to TE30, you can use the TE31 personnel calculation rule, which does not delimit incomplete pairs automatically, but instead ends time evaluation with corresponding messages.

  • The "difficult" errors to which pair formation could not assign a status are intercepted by the TD20 personnel calculation rule.

Illustration showing functions for calling personnel calculation rules: ACTIO, PTIP/PTIPA, RTIP/RTIPA, with examples TE20, TE30, TR10, TP20

The ACTIO function accesses a personnel calculation rule that carries out processing regardless of the existence of TIP entries (for example, checking the current day for errors, determining the flextime balance).

The PTIP function accesses a personnel calculation rule that processes each entry of the TIP table according to the rule. If a TIP entry is still available after processing, it must be transferred from the personnel calculation rule to the output table TOP by the COLOP* operation (except for operations that generate a TIP entry, such as INSTP, GENTG, INSLR, or GENTP). After all the TIP entries have been processed, the TOP table is converted to the new TIP.

The RTIP function accesses a personnel calculation rule that reads the content of the TIP table according to the rules. The RTIP function works in exactly the same way as the PTIP function, with the restriction that no changes can be made to the TIP entries.

The PTIPA and RTIPA functions correspond to the PTIP and RTIP functions respectively; the only difference is that they are processed only if there is an absence on the current day.

Hint

The absence must also have an "absence flag." The flag is assigned to the absence in the TE21 personnel calculation rule.

For more information, see the documentation for the TFLAG operation.

Image showing work schedule specifications with start time and tolerance, scenarios of clock-in entries, and the function DPTOL adjusting start times

The DPTOL function is used to edit TIP entries according to the start and end tolerances stored in the daily work schedule. If an employee clocks in during the tolerance interval, for example, all further calculations are based on the start of planned working time.

Alternatively, or in addition to DPTOL, you can use the standard personnel calculation rule TL10 to round the first and last TIP entry according to the employee subgroup. This enables you to deduct time if an employee clocks in late, for example. You use the ROUND operation to round times.

Related Information

For more information about the topics in this lesson, see the SAP Library and choose: Human ResourcesPersonnel Time ManagementTime EvaluationDay Processing of Time Data in Time Evaluation.