Feb 8, 2011

Adding of Adding Of Date, Week, Month & Year To A Date

*Please create 1 Z Program and paste the below Code.

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