‎2008 Jan 03 4:28 PM
Hi Friends,
I have a requirement where in I have to get the final date if I add some days to the initial date.
For example I have the begin date as 11/02/2007...I have the number of days as 91...If I add these days to the initial date I will get the final date.
Is there any fm to achieve the same if i have the initial date and number of days...Please let me know..Its bit urgent
Susmita
‎2008 Jan 03 4:30 PM
IF pa_older = 'X'.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = pa_end
days = '00'
months = '06'
signum = '-' << it reduces if + adds
years = '00'
IMPORTING
calc_date = pa_end.
ENDIF.
‎2008 Jan 03 4:31 PM
hi ,
you dont have to go for any function module.You can directly add the number of days to the date for getting the final date.try this example..
parameters:
p_date like sy-datum,
p_days type i.
p_date = p_date + p_days.
write p_date.
regards,
veeresh
‎2008 Jan 03 4:32 PM
‎2008 Jan 03 4:33 PM
Use FM HR_SEN_CALE_DAYS_DATE
pass Date to ID_DATE.
IS_DURATION-CALDD = 91.
You can also add days directly to date.
lv_date_new = lv_date + 91.
Lokesh
Edited by: Lokesh Aggarwal on Jan 3, 2008 4:34 PM
‎2008 Jan 03 4:34 PM
‎2008 Jan 03 4:34 PM
Just add the days to the date and you will get the result date.