Google Search - Blog...........

ABAP - Adding Of Date, Week, Month & Year To A Date

REPORT ZTEST .

DATA :I_DATE LIKE SY-DATUM,
DATE LIKE SY-DATUM .


*--here if I_IPRKZ = space it is in days
* if I_IPRKZ = 1 it is in weeks
* if I_IPRKZ = 2 it is in months
* if I_IPRKZ = 3 it is in years
*--here i_ time will display the no of weeks or months or yeas

CALL FUNCTION 'ADD_TIME_TO_DATE'
EXPORTING
I_IDATE = SY-DATUM "Original date
I_TIME = '4'
I_IPRKZ = ' '
IMPORTING
O_IDATE = date ."new date

WRITE:/ DATE .

No comments:

Post a Comment