Analyzing Data Collection in Time Evaluation

Objective

After completing this lesson, you will be able to name the functions that are used to import employees' planned specifications and their infotypes.

Data Collection in Time Evaluation

Flowchart illustrating data import for work schedules, showing postings, absences, and attendances with corresponding functions P2000–P2011

Employees' planned specifications, time events, and data from the time infotypes are imported using special functions. Depending on your method of time recording, you use either function P2000 or P2011 to import employees' planned specifications (from the work schedule).

Additional function for importing data:

A2003: You can use the A2003 function to take account of position substitutions that lead to a different payment in time evaluation.

Substitutions that lead to a change in the planned specifications are imported by the P2000 or P2011 functions.

For more information, see the Implementation Guide for Personnel Time Management and choose Time EvaluationTime Evaluation With Clock TimesProviding Time Data..

Diagram showing Function P2000: Importing Daily Work Schedule with working hours, breaks, start/end times, and tables for planned specs and time evaluations

The P2000 function is used for the following tasks:

  • Recording work schedule deviations

    The P2000 function enters the employee's current work schedule in the internal table TZP. It also enters a time pair according to the day's planned working times in the work table TIP. This pair is flagged as a planned pair.

  • Time evaluation where actual times are recorded without time recording devices

    If you use the recorded attendances from the Attendances infotype (2002) as a basis for the valuation of times, the P2000 function places the daily work schedule in the TZP table. You prevent the system forming a planned pair by entering NOTP in parameter 4 of the function.

  • Evaluation or simulation of future times

    For the evaluation of future times, no information on employees' actual work is available. Time evaluation therefore uses the P2000 function to generate information on the day. It enters the daily work schedule in the TZP table and a planned pair in the TIP table.

Screenshot of daily work schedule Function P2000 showing planned working hours, flextime, fixed hours, breaks, and valuation details

The planned specifications ("When was the employee scheduled to work?") are based on the employee's personal work schedule. If a substitution is assigned to the employee on the day being evaluated, the substitution overrides the daily work schedule.

For more information, see the Implementation Guide for Personnel Time Management and choose Work SchedulesDaily Work SchedulesDefine Daily Work Schedules..

Table illustrating Function P2000: Filling Internal Table TZP, displaying time, time identifiers, break durations, and work schedule details (DWS class 5)

An entry is generated in the internal table TZP for each time point in the daily work schedule; all clock times are decimalized. Each entry in the TZP table is assigned a time identifier, which describes each section of the daily work schedule.

Time evaluation also uses the P2000 function to import the daily work schedule, daily work schedule variant, day type, daily work schedule class, and the planned working hours.

Diagram showing planned daily work schedule versus actual employee postings, including times for start, breaks, end of work, and database storage (TZP, TIP)

You use the P2011 function when you upload time events/time postings from external time recording systems to SAP ERP. The P2011 function performs two tasks:


  • Importing planned specifications:

    The employee's current daily work schedule is first imported to the internal table TZP.

  • Providing actual times:

    The pairs formed from the time postings are then placed in the internal table TIP.

If you use the P2011 function in the schema, you require the P2000 function only if you want to load planned specifications for future days.

Illustration of time event pair formation process in Function P2011, showing time events, pair types, origin indicators, and reference table data

The P2011 function transfers the time pairs that were formed from the time postings from the PT table (cluster B2) to the internal work table TIP. All clock times are decimalized in the process.

If pair formation assigns time events to the previous day, the system adds 24 hours to the time pair.

So that the TIP table is not overloaded with information, further data on the TIP entries is stored in other tables. This separation of data is known as a split. Only the reference to the corresponding table is stored in the TIP table:

  • PT - Pair table

  • ALP - Different payment

  • C1 - Cost assignment specifications

  • AB - Absences

The reference number that is specified under the table name refers to the corresponding record in the table in cluster B2. The numbers in these tables are assigned automatically.

Diagram illustrating processing using internal tables for time evaluation, showing inputs, results, and outputs categorized into clusters and wage types

Internal tables are the work tables of time evaluation. They are filled and changed during the time evaluation run. When time evaluation requires specific data for a processing step, it reads it from the internal tables and then processes it further. At the end of the processing step, the results are entered in the internal table again, where they are available for additional processing steps.

Hint

For many functions (such as PTIP, PZL, POVT), you have to use operations (such as COLOP*, ADDZL, ADDDB) in the personnel calculation rule to ensure that the changed entries are entered in the internal table again.

Internal tables are temporary in nature, and are deleted at the end of time evaluation for each employee. Data that is required subsequently, such as time balances and time wage types, is exported to tables in cluster B2 in file PCL2 at the end of time evaluation.

The principal work table is the internal table TIP (daily input). It provides the input for the respective processing step in the form of the time data that has been imported or evaluated so far by time evaluation. The entries in TIP are processed line by line and inserted in the internal table TOP (daily output). The TOP table becomes the new TIP table at the end of the processing step.

The internal table TZP contains the planned specifications from the employee's personal work schedule.

The values in the internal tables that are determined in the individual processing steps are displayed in the time evaluation log.

For more information, see the SAP Library and choose: Human ResourcesPersonnel Time ManagementTime EvaluationTime Data Processing in Time EvaluationProcessing Using Internal Tables.

Diagram showing Functions P2001 and P2002 handling absences (8:00–10:30) and attendances (10:30–17:00) with detailed tabular breakdown

The P2001 function generates an entry in the internal table TIP for each recorded absence (infotype 2001). The P2002 function enters the attendances from infotype 2002 in the internal table TIP. For full-day attendances and absences, a time pair is generated according to the planned working times from the daily work schedule.

Depending on how attendances and absences are recorded and how the HRSIF feature is set, the clock times are stored in the TIP table.

When providing full-day attendances or absences, time evaluation generates the times according to the planned working times. (When full-day attendances and absences are recorded, the attendance or absence hours are not entered manually, but instead are imported automatically from the daily work schedule.)

The Processing type/time type class (field CT) is used to group together attendances and absences that are processed identically in Time Evaluation Without Clock Times. It has no relevance for Time Evaluation With Clock Times.

Image displaying rules and codes for processing attendance and absence reasons, including doctor's appointments and time off in lieu of flextime

Employees can record an attendance or absence reason in conjunction with a clock-in or clock-out entry at the time recording terminal. Time evaluation can use the attendance or absence reasons to generate records for the Attendances (2002) and Absences (2001) infotypes automatically.

The TD80 rule evaluates the attendance and absence reasons using the Att./Absence Reasons for Subsystem view (V_T705A). All the automatically generated records are defined as locked infotype records in the system.

SAP ERP creates locked attendance/absence records because it assumes that the generated attendance/absences must still be approved by the time data administrator. The time administrator can quickly and easily unlock the records using the message processing function of the Time Manager's Workplace.

An additional entry is generated in the TIP table and evaluated for records of less than one day. The payroll for the day in question is first run provisionally, since generating a locked attendance or absence record sets a recalculation for the day.

A full-day attendance or absence is evaluated on the following day by the personnel calculation rule TD90. If the attendance or absence is still locked and the day is a workday, a planned pair is entered in the TIP table. If the following day is not a workday, the automatically generated record can be extended by one day.

For more information, see the Implementation Guide for Personnel Time Management and choose:

  • Time EvaluationTime Evaluation With Clock TimesProviding Time DataAbsencesProvide Full-Day Absences Recorded at Terminal
  • Time EvaluationTime Evaluation With Clock TimesProviding Time DataAbsencesProvide Full-Day Attendances Recorded at Terminal
Flowchart illustrating the assignment of a daily work schedule (Rule TD30) based on personal work needs, segmented into Early, Late, and Night shifts

The dynamic assignment of the daily work schedule allows time evaluation to determine the appropriate daily work schedule depending on the time of the first clock-in entry for the day. You can use the dynamic assignment for relief shifts, for example, to assign employees an appropriate work schedule.

The TD30 rule compares the employee's first clock-in posting with the corresponding entries from the Dynamic Assignment of Daily Work Schedules view (V_T552V) to determine the current daily work schedule.

You can see in the time evaluation log or the PSP table in cluster B2 which daily work schedule SAP ERP has assigned to the employee.

For more information, see the Implementation Guide for Personnel Time Management and choose Time EvaluationTime Evaluation With Clock TimesProviding Time DataWork Schedule and Time EventsDynamic Assignment of Daily Work SchedulesDynamic Assignment Based on Clock-Ins.

Flowchart displaying steps for evaluating and simulating time data for future periods, including conditions, simulation, and data provision processes

You can also run time evaluation for future periods or for periods that end in the future. Projection for future periods triggers a database update. You normally use a special schema that is only valid for future evaluations.

Simulation for future periods does not trigger a database update. In the standard system, it is used for planning shifts and for information about an employee's probable future quota entitlements.

Hint

If you want to prevent a database update in other situations, start RPTIME00 using the program option Test run (no update).

You can use the IF function to set conditions to control the further processing. IF constructions are formed in conjunction with functions ELSE and ENDIF.

The system supplies some frequently used conditions. Examples:

  • IF NEG : Time Management status 9 (Recording deviations to the work schedule)

  • IF POS : Time Management status 1 or 2 (Recording all times)

  • IF EOP : Last day of payroll period

If you want to set customer-specific conditions, you can use the IF function with a personnel calculation rule.

You can use parameter 2 of functions P2001 and P2002 to determine that manually recorded attendance and absence records delimit time pairs already in the TIP table. This ensures that attendances and absences already recorded are taken into account correctly for future periods.

For more information, see the SAP Library and choose: Human ResourcesPersonnel Time ManagementTime EvaluationDay Processing of Time Data in Time EvaluationSimulation and Projection of Time Evaluation Results.

Table showing functions, parameters, and their descriptions for data collection in Schema TM00 workflow process

Data collection in the schema follows a set sequence.

Two additional personnel calculation rules play an important part in data collection:

  • The TD20 personnel calculation rule processes the errors determined in pair formation.

  • The TD10 personnel calculation rule checks whether the daily work schedule of the day to be evaluated is not yet completed at the time of the evaluation. It terminates processing for the day if the difference exceeds the value specified in the constant TETOL (Payroll Constants table (T511K)).

Image showing selection rules using function CHECK: PON selects statuses other than 0, and NEG selects status 9 only

The CHECK function uses the Time Management status, which is stored for each employee in the Planned Working Time infotype (0007), to check whether the employee should be selected for time evaluation with the relevant schema.

If the CHECK function does not feature in the schema with a parameter specifying which employees should be selected, all employees with the Time Management status 1 or 2 are selected for time evaluation.

The CHECK function can be inserted at any point in the schema. The difference between the use of the CHECK function and the IF function is as follows:

  • You use the CHECK function to set switches that affect the entire time evaluation run for the employee.

  • You use the IF function to set conditions so that the processing is carried out only if the specified condition is met.

For more information, see the SAP Library and choose: Human ResourcesPersonnel Time ManagementTime EvaluationTime Data Processing in Time EvaluationUsing Function CHECK to Select Employees.

Glossary

Example

Planned pair:

The time pair automatically generated in time evaluation or in the processing of time data in payroll according to the start and end of working time stipulated in the employee's work schedule.