2008 Mar 13 9:21 AM
Hi ,
How can I add 2 months to sy-datum?
Eg:
if system date is 01.10.2008,
then the date should be 01.12.2008.
Please let me know this since it is very urgent.
Regards,
Rabiya.
2008 Mar 13 9:25 AM
HI
Use this FM BKK_ADD_MONTH_TO_DATE
pass the no of months and date
Function module BKK_ADD_MONTH_TO_DATE
Import parameters Value
MONTHS 2
OLDDATE 10.02.2008
Export parameters Value
NEWDATE 10.04.2008
Or use
Function module ISP_ADDING_MONTHS_TO_DATE
Import parameters Value
MONTHS 2
START_DATE 10.10.2008
Export parameters Value
END_DATE 10.12.2008
regards
Shiva
2008 Mar 13 9:25 AM
HI
Use this FM BKK_ADD_MONTH_TO_DATE
pass the no of months and date
Function module BKK_ADD_MONTH_TO_DATE
Import parameters Value
MONTHS 2
OLDDATE 10.02.2008
Export parameters Value
NEWDATE 10.04.2008
Or use
Function module ISP_ADDING_MONTHS_TO_DATE
Import parameters Value
MONTHS 2
START_DATE 10.10.2008
Export parameters Value
END_DATE 10.12.2008
regards
Shiva
2008 Mar 13 9:28 AM
Hi,
Date:01.10.2008
v_var = date+3(2).
v_var1 = v_var.
v_var1 = v_var1 + 2.
replace first occurence of v_var in date with v_var1.
try this..
Regards,
Karthick.
2008 Mar 13 9:30 AM
Hi,
Use the FM : RE_ADD_MONTH_TO_DATE
Usage :
DATA new_date LIKE sy-datum.
CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
EXPORTING
months = '2'
olddate = sy-datum
IMPORTING
newdate = new_date.
new_date will hold your new date.
Cheers,
Remi
2008 Mar 13 9:30 AM
Hi,
By using following function module you can add or delete months to the given input in exporting parameter.
DATA: VAR1 TYPE SY-DATUM.
This gives the previous month and next month
CALL FUNCTION 'HR_PT_ADD_MONTH_TO_DATE'
EXPORTING
dmm_datin = sy-datum
dmm_count = '2'
dmm_oper = '+' " Operation (add/subtract)
dmm_pos = 'B' " Set date in the beginning or end of month
IMPORTING
DMM_DAOUT = VAR1
EXCEPTIONS
UNKNOWN = 1
OTHERS = 2.
WRITE:/ VAR1.
Reward points,if it is useful.
Regards,
Chandu.
2008 Mar 13 9:39 AM
Try FM RP_CALC_DATE_IN_INTERVAL.
Pass
DATE = <sy-datum>
DAYS = '00'
MONTHS = '01'
SIGNUM = '+'
YEARS = '00'
And the FM will return the calculated date in CALC_DATE variable.
Hope this helps.
Thanks,
Balaji