‎2008 Apr 17 1:00 PM
Hi All,
I want to know the function module used for adding days to date.
Suppose i got date 10.04.2008 and i want to add 8 days to that so that output should be 18.04.2008.
How can i do this?
Regards,
Deepak.
‎2008 Apr 17 1:05 PM
hi.
ADD_TIME_TO_DATE
Adds months/days/years to a date
RP_CALC_DATE_IN_INTERVAL
Adds/subtracts years, months, days to/from date
cheers,
sharad.
Edited by: sharad narayan on Apr 17, 2008 2:06 PM
‎2008 Apr 17 1:03 PM
Why do you want a function module - this is built into ABAP.
data: first_date type d,
eight_days_later type d.
first_date = '20080410'.
eight_days_later = first_date + 8.Someone will be along with a function module soon, I expect.
matt
‎2008 Apr 17 1:03 PM
‎2008 Apr 17 1:04 PM
See? And, btw, the original question said nothing about WORKING DAYS. Just days.
‎2008 Apr 17 1:05 PM
hi.
ADD_TIME_TO_DATE
Adds months/days/years to a date
RP_CALC_DATE_IN_INTERVAL
Adds/subtracts years, months, days to/from date
cheers,
sharad.
Edited by: sharad narayan on Apr 17, 2008 2:06 PM
‎2008 Apr 17 1:10 PM
Hi,
data: v_next type sy-datum.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
DATE = '20080410'
DAYS = '08'
MONTHS = '0'
SIGNUM = '+'
YEARS = 0
IMPORTING
CALC_DATE = v_next.
write:/5 'Future date', v_next.
‎2008 Apr 17 1:10 PM
HI,
You can use FM RP_CALC_DATE_IN_INTERVAL.
In Days field input the no. of days to increased and SIGNUM should be +.
Thanks,
Sriram Ponna.
‎2008 Apr 17 1:10 PM
HI,
You can try also the following Function module ADD_TIME_TO_DATE
Regards
‎2008 Apr 17 1:22 PM
hi,
try this fn module
HR_ECM_ADD_NUMBER_UNIT_TO_DATE
regards
priyaraj