Show TOC

 Technical Process of Employment Period Calculation

Purpose

You use this process to calculate an employment period. Employment period information consists of three elements; start, end, and duration of period.

The Elements in Employment Period Information

Depending on which element the SAP System should calculate, three different calculation types are available:

Calculation type

Prerequisites

Example

( 1 ) Duration of an employment period

Start and end date are available

An employee started at the company at =1/01/1960 and is active up to 05/31/1999.

You need the duration of this employment period.

( 2 ) End of an employment period

Start date and duration are available

An employee was hired on 07/15/1980 and receives a gratuity after an actual employment period of 25 years.

You need the end date of this employment period.

( 3 ) Start of an employment period

Duration and end date are available

The day on which an employee's last employment year starts is important for a country-specific taxation basis. Absence periods are taken into account.

You need the start date of the employment period with the end date 12/31/1999.

Prerequisites

When the employment period calculation function is called, the SAP System must have at least the following import parameters:

  • Calculation process

  • Personnel number

  • Calculation type

  • Selection date

In addition, two of the following three parameters must exist for a single calculation process, depending on which calculation type is used: The third parameter is determined using the calculation type:

  • Start date

  • End date

  • Duration

If the calculation process uses additional logic, it is the task of the function module for the additional logic for the calculation process to determine the two required import parameters.

Each employment period calculation is started with the function module HR_SEN_CALCULATE_COMPLETE ( Employment Period Calculation for Calculation Process ). This function module is called within an SAP application and must be inserted at the appropriate place by the program developers. The function module is also called if you run a manual calculation in the Calculation of Employment Period infotype (0553). It is only possible to call the calculation in the Calculation of Employment Period infotype if a function module for additional logic for the employment period calculation is assigned to the calculation process.

Process Flow

When the employment period is calculated, the system differentiates between simple calculation processes and calculation processes with additional logic. The latter contains a function module for additional logic .

Note Note

The technical sequence of the individual calculation processes is very different. Therefore, the technical sequence should only be briefly mentioned and is not shown in detail here.

End of the note.

The technical sequence of the employment period is split into the following steps in the SAP System:

  1. The SAP System starts the calculation process with the function module HR_SEN_CALCULATE_COMPLETE. This function module imports the required parameters (country grouping, calculation process, personnel number, calculation type, selection date, and so on), and checks these against the calculation type. There are four calculation type specifications:

  • _ (blank) Complete employment period calculation

  • 1 : Calculation of the duration of an employment period

  • 2 : Calculation of the end of an employment period

  • 3 : Calculation of the start of an employment period

If the calculation process uses additional logic, the calculation type need not be entered (blank). However, the additional logic then determines the calculation type.

  1. Finally, the SAP System calls the function module HR_SEN_READ_PROCESS ( (Read Control Parameters for Calculation Process ). This function module reads all relevant control information from the imported calculation process. For example, it checks whether the calculation process contains a function module for additional logic for the calculation process , and which conversion rule is used for the calculation of durations and date specifications.

  2. If a different valuation model is permitted for this calculation process, the function module HR_SEN_VALUATION_MODEL_INDIV ( Read Individual Valuation Model for Employment Period Calculation ) checks that a valuation type is entered in the Calculation of Employment Period infotype (0553) and imports it.

  3. The subsequent sequence is dependent on whether it is a simple calculation process or a calculation process with additional logic.

  • If it is a simple calculation process, the SAP System calls the general function module HR_SEN_CALCULATE_PROCESS_STEP ( Employment Period Calculation for Calculation Process Step) directly .

  • If a function module for additional logic has been entered, the SAP System first calls this module and processes it. This function module then calls the general function module HR_SEN_CALCULATE_PROCESS_STEP.

  1. The SAP System uses the calculation process and accompanying process steps to determine the assigned valuation model and rounding rule . If applicable, the different valuation model is used. The SAP System uses the valuation model to determine the selection classes and selection rules.

  2. The individual selection rules generate periods from the employee data and group it in selection classes. The selection class periods are then evaluated in the valuation model.

  3. Depending on which calculation type is being used, one of the following three function modules is called:

  • The function module HR_SEN_EVALUATE_DURATION determines the duration from the start and end date.

  • The function module HR_SEN_ASCE_EVALUATE_DATE determines the end date from the start date and duration.

  • The function module HR_SEN_DESC_EVALUATE_DATE determines the start date from the duration and end date.

  1. If calculation type 1 was selected, the SAP System rounds the duration at the end of processing using the rounding rule.

Result

When the employment period has been calculated, the SAP System has determined the required duration or date.