Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata
Error rendering macro 'code': Invalid value specified for parameter 'lang'
REPORT ZDATES.
PARAMETERS: P_DATE TYPE SY-DATUM , " original date
P_DAYS TYPE T5A4A-DLYDY, " no of days to be added
P_MONTH TYPE T5A4A-DLYMO, " no of months to be added
P_YEAR TYPE T5A4A-DLYYR . " no of years to be added
SKIP.
PARAMETERS:ADD TYPE T5A4A-SPLIT RADIOBUTTON GROUP G1 , " to add the values
SUB TYPE T5A4A-SPLIT RADIOBUTTON GROUP G1. " to subtract the values
DATA: CALC_DATE TYPE SY-DATUM,
DAYS TYPE T5A4A-DLYDY,
MONTHS TYPE T5A4A-DLYMO,
YEARS TYPE T5A4A-DLYYR ,
SIGN TYPE T5A4A-SPLIT .
IF ADD = 'X'.
  SIGN = '+'.
ELSE.
  SIGN = '-'.
ENDIF .
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
  EXPORTING
    DATE      = P_DATE
    DAYS      = P_DAYS
    MONTHS    = P_MONTH
    SIGNUM    = SIGN
    YEARS     = P_YEAR
  IMPORTING
    CALC_DATE = CALC_DATE.
WRITE:/ 'the result date is:' , CALC_DATE .
IF ADD = 'X'.
  WRITE:/ 'days added' , P_DAYS .
  WRITE:/ 'months added', P_MONTH.
  WRITE:/ 'years added', P_YEAR .
ELSE .
  WRITE:/ 'days subtracted', P_DAYS .
  WRITE:/ 'months subtracted', P_MONTH.
  WRITE:/ 'years subtracted', P_YEAR .
ENDIF.
  • No labels