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
| Parameter | Type | Description | Required |
|---|---|---|---|
| DATE | P0001-BEGDA | Start date | Yes |
| DAYS | T5A4A-DLYDY | Number of days | Yes |
| MONTHS | T5A4A-DLYMO | Number of months | Yes |
| SIGNUM | T5A4A-SPLIT | Direction ('+' or '-') | — |
| YEARS | T5A4A-DLYYR | Number of years | Yes |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| CALC_DATE | P0001-BEGDA | Calculated 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.