12-10-2006 8:32 AM
Hi,
I want to know if I'm having todays date, how get I get a date just knowing the difference on month.
For Exmp.
Let diff is of 12 months.
i.e. if 29/02/2004 should give 28/02/2003
and 28/02/2003 should return 28/02/2002
and 01/03/2005 return 01/03/2004
12-10-2006 8:35 AM
hi,
chk this.
data : wa_date type sy-datum.
call function 'RP_CALC_DATE_IN_INTERVAL'
exporting
date = sy-datum
days = 0 --------------------> "give ur required days
months = 12 --------------------> "give ur required month
years = 0
signum = '-'
importing
calc_date = wa_date.
write 😕 wa_date. -> new minised date
Note
."signum = '+' "
."signum = '-' "
rgds
Anver
12-10-2006 8:35 AM
hi,
chk this.
data : wa_date type sy-datum.
call function 'RP_CALC_DATE_IN_INTERVAL'
exporting
date = sy-datum
days = 0 --------------------> "give ur required days
months = 12 --------------------> "give ur required month
years = 0
signum = '-'
importing
calc_date = wa_date.
write 😕 wa_date. -> new minised date
Note
."signum = '+' "
."signum = '-' "
rgds
Anver