Application Development 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: 

Require a function module to add days to a date?

Former Member
0 Kudos
3,770

My purpose is to add days to a particular date and get the resulting date. I tried using this function module "RP_CALC_DATE_IN_INTERVAL", but the problem is this function module only accepts two digits for days. i.e. i am only able to add a maximum of 99 days to a particular date, but i do want to go further and add more so please tell me if there is any function module which shall help me add 3 digit days to a date.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
1,249

Hey,

You can simply use as following

Data: date type sy-datum.

date = date + 100.

Hope this helps.

Thanks

Naresh

6 REPLIES 6

Former Member
0 Kudos
1,249

Hi , use BKK_ADD_WORKINGDAY.

Krishna

Former Member
0 Kudos
1,249

Hi Kiran,

You can use the FM 'HR_SEN_CALE_DAYS_DATE' to calculate date. This FM also gives you an option of giving year, month or days from a date to calculate next date.

Hope this helps!

Regards,

Saurabh

Former Member
0 Kudos
1,249

Hi Kiran

You can simply add the number of days to the date.

Check below example:

data: l_date like sy-datum.

l_date = sy-datum + 365.
write:/ l_date.

Kind Regards

Eswar

Former Member
0 Kudos
1,249

Hi Kiran,

You can directly add days to the date.

Eg:

DATA date LIKE sy-datum.
DATA days TYPE i.

date = sy-datum.
days = 100.

date = date + days.

WRITE date.

Regards

Wenceslaus

Former Member
0 Kudos
1,250

Hey,

You can simply use as following

Data: date type sy-datum.

date = date + 100.

Hope this helps.

Thanks

Naresh

Former Member
0 Kudos
1,249

hi

use the same function module ...it works fine ..... please note there r other options like month and year ...so u can very well pass any number of days by using month and year field...

regards

aswin