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

Function module required--Urgent

Former Member
0 Likes
800

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

6 REPLIES 6
Read only

former_member156446
Active Contributor
0 Likes
763

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.

Read only

former_member673464
Active Contributor
0 Likes
763

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

Read only

Former Member
0 Likes
763

fm: BKK_ADD_WORKINGDAY

Read only

Former Member
0 Likes
763

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

Read only

Former Member
0 Likes
763

HI,

You can use FM BKK_ADD_WORKINGDAY .

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
763

Just add the days to the date and you will get the result date.