CA Function module Used the same way in S/4HANA

RP_CALC_DATE_IN_INTERVAL Add or Subtract Years, Months and Days to a Date

Calculates a date in the future or past by adding or subtracting a number of years, months and days to a start date. It is used in reports and HR or contract logic to compute due dates, validity ends or probation periods. Set SIGNUM to '+' or '-' and pass all three counters (use 0 for unused ones); month ends are adjusted automatically.

Function group
RPPA
Remote-enabled (RFC)
No
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
DATEP0001-BEGDAStart dateYes
DAYST5A4A-DLYDYNumber of daysYes
MONTHST5A4A-DLYMONumber of monthsYes
SIGNUMT5A4A-SPLITDirection ('+' or '-')—
YEARST5A4A-DLYYRNumber of yearsYes

Exporting parameters

ParameterTypeDescription
CALC_DATEP0001-BEGDACalculated date

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
  EXPORTING
    date = lv_date
    days = lv_days
    months = lv_months
    years = lv_years
  IMPORTING
    calc_date = lv_calc_date.

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report