11-13-2007 7:15 PM
experts,
i have question regarding date calculations.
how can i compute l_date where l_date = three days after the present date?
do i have to use a function module for this? if yes, what function module?
thank you so much...
11-13-2007 7:28 PM
Hi see this,
parameters input_date type sy-datum.
data output_date type sy-datum.
CALL FUNCTION <b>'RP_CALC_DATE_IN_INTERVAL'</b>
EXPORTING
date = input_date
<b>days = 3</b>
months = '00'
<b>signum = '+'</b>
years = '00'
IMPORTING
calc_date = output_date.
write : 'Output DATE', output_date.
Hope ur problem is solved now.
<b>Reward points if useful</b>
Thanks & Regards
ilesh 24x7
11-13-2007 7:18 PM
11-13-2007 7:20 PM
Hi,
No need to use FM to calculate date, but you can use FM RP_CALC_DATE_IN_INTERVAL (if you want).
You can do something like this.
data: wa_date like sy-datum.
wa_date = sy-datum + 3.
write: / wa_date.
Regards,
Ferry Lianto
11-13-2007 7:22 PM
Hi
This is very simple
You can add or substract number of days from the field (SY-DATUM) to get the required date
data: date1 type sy-datum, date2 type sy-datum.
date2 = sy-datum + 3. (13.11.2007 + 3 )
will give you 16.11.2007
similarly if you wants 10 days back date
date1 = sy-datum - 10.
will give you 03.11.2007
Regards
Anji
11-13-2007 7:28 PM
Hi see this,
parameters input_date type sy-datum.
data output_date type sy-datum.
CALL FUNCTION <b>'RP_CALC_DATE_IN_INTERVAL'</b>
EXPORTING
date = input_date
<b>days = 3</b>
months = '00'
<b>signum = '+'</b>
years = '00'
IMPORTING
calc_date = output_date.
write : 'Output DATE', output_date.
Hope ur problem is solved now.
<b>Reward points if useful</b>
Thanks & Regards
ilesh 24x7
11-13-2007 7:33 PM