Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Fun Module

Former Member
0 Likes
1,007

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
979

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

8 REPLIES 8
Read only

matt
Active Contributor
0 Likes
979

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

Read only

Former Member
0 Likes
979

Hi,

check out FM BKK_ADD_WORKINGDAY

Regards,

Satish

Read only

matt
Active Contributor
0 Likes
979

See? And, btw, the original question said nothing about WORKING DAYS. Just days.

Read only

Former Member
0 Likes
980

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

Read only

Former Member
0 Likes
979

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.

Read only

Former Member
0 Likes
979

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.

Read only

Former Member
0 Likes
979

HI,

You can try also the following Function module ADD_TIME_TO_DATE

Regards

Read only

Former Member
0 Likes
979

hi,

try this fn module

HR_ECM_ADD_NUMBER_UNIT_TO_DATE

regards

priyaraj