Ansicht
Dokumentation

HR_99S_GET_DURATION - HR_SWE : Calculation of a duration

HR_99S_GET_DURATION - HR_SWE : Calculation of a duration

rdisp/max_wprun_time - Maximum work process run time   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module is called only by country specific programs.

This function module calculates a duration between two dates :

  • one date is defined based on the customizing entered in the table T5F99CD
This date can be searched within an infotype ( 0041 or others ) or can be provided by a customer function.
  • the other date is provided by the calling program.
This date may be adjusted to the first , the15th or the last day of the month or let as it is.

The duration will be calculated from the earlier date to the most recent one.

The table T5F99CD allows to define the origin of the first mentioned date depending on :

  • the country grouping
  • the processing area
  • the type of duration

In addition several possibilities can be defined successively , since a sequence number is also handled.

Standard values for processing areas are as follows :

  • 'DEFAULT' ,,,,Default processing area, used when no specific processing area is provided by the calling program
  • 'FR_CONT_SP',,FRANCE : Processing of contracts with special exemption ( used by the function module ,,,,,,,,,,HR_FR_PROCESS_SPECIAL_CONTRACT )

You can define your own values for customer specific requirements.

Standard values for types of duration are as follows :

  • 'AGE',,,,,,the calculated duration represents the age.
  • 'SEN',,,,,,the calculated duration represents the seniority.

You can define your own values for customer specific requirements.

Import parameters are :

  • P_MOLGA,,,,Country Grouping
  • P_PERNR,,,,Standard Selections for HR Master Data Reporting
  • P_PROCA,,,,Processing area for calculation of duration
  • P_TYPE,,,,Type of duration for calculation of duration
  • P_DATE,,,,From or To Date for calculation
  • P_FORMAT,,,,Unit in which is expressed a duration
  • Y,,Duration expressed in years

  • M,,Duration expressed in month

  • D,,Duration expressed in days

  • C,,Complete years, complete month and remaining days

The function gives back following export parameters :

P_ONLY_DAYS ,,duration in days only

P_ONLY_MONTH duration in month only

P_ONLY_YEARS duration in years only

P_COMPLETE_YEARS duration in complete years

P_COMPLETE_MONTH remaining complete month

P_REMAINING_DAYS remaining days

P_BEGDA_OUT beginning date

P_ENDDA_OUT end date

Example

A company defines the seniority of its employees in a different way for two country specific processing area.

For the first processing area, the seniority is defined with the help of the technical date number 01 of the infotype 0001. In case the date is not found, the seniority is defined with the help of the infotype 0001.

For the second one, the seniority is defined with the help of the technical date number 12 of the infotype 0041.

In the case where these dates are not found, the default is to use the customer function module Z_DEFINE_SEN.

This algorythm can be defined by customizing the table T5F99CD as follows :

Processing area /Type of duration / Sequence number /Infotype /Field/ date type/ Function

PROC_01,, SEN 01 0041 01,, ,, ,,,,

PROC_01 SEN 02 0001 BEGDA

PROC_02 SEN 01 0041 12,,

DEFAULT SEN 01

Notes

Further information





Parameters

P_BEGDA_OUT
P_COMPLETE_MONTH
P_COMPLETE_YEARS
P_DATE
P_ENDDA_OUT
P_FORMAT
P_MOLGA
P_ONLY_DAYS
P_ONLY_MONTH
P_ONLY_YEARS
P_PERNR
P_PROCA
P_REMAINING_DAYS
P_TYPE

Exceptions

DATE_NOT_FOUND
ERROR_T5F99CD
NOT_FOUND_IN_T5F99CD

Function Group

HR99S00_TIME

PERFORM Short Reference   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 5288 Date: 20240523 Time: 120935     sap01-206 ( 55 ms )