Ansicht
Dokumentation

HR_SEN_CALE_DAYS_DATE - Calculation of a Date: Add/Subtract Calendar Days

HR_SEN_CALE_DAYS_DATE - Calculation of a Date: Add/Subtract Calendar Days

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Function Module for the Calculation of a Date

This function module can be used for a conversion rule if only calendar days are used. The function module calculates the other restricting date for a period that is defined by the duration in calendar days and a restricting date.

If the fields for Years or Months are filled in the import parameter IS_DURATION, the function module triggers the exception CONVERSION_NOT_SPECIFIED.

Depending on which operator is used, the function module either adds the value [number of days - 1] to the date ID_DATE or subtracts this value from the date ID_DATE.

The function module returns the result in the export parameter ED_DATE. For the addition and subtraction, it uses the basic rules of ABAP, in other words, the decimal days are rounded up or down.

Example 1

Import parameter

  • ID_DATE = 05.03.2001
  • IS_OPERATOR = '+'
  • IS_DURATION = (0.0 years; 0.0 months; 2.0 days)

Export parameter

  • ED_DATE = 06.03.2001

Example 2

Import parameter

  • ID_DATE = 05.03.2000
  • IS_OPERATOR = '+'
  • IS_DURATION = (0.0 years; 0.0 months; 367.0 days)

Export parameter

  • ED_DATE = 06.03.2001

Example 3

Import parameter

  • ID_DATE = 06.03.2001
  • IS_OPERATOR = '-'
  • IS_DURATION = (0.0 years; 0.0 months; 367.0 days)

Export parameter

  • ED_DATE = 05.03.2000





Parameters

ED_DATE
ID_DATE
ID_OPERATOR
IS_DURATION

Exceptions

CONVERSION_NOT_POSSIBLE
CONVERSION_NOT_SPECIFIED

Function Group

HRSEN00CRULE_CALE_DAYS

CPI1466 during Backup   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 2188 Date: 20240523 Time: 112311     sap01-206 ( 35 ms )