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

Require a function module to add days to a date?

Former Member
0 Likes
5,741

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
Read only

Former Member
0 Likes
3,220

Hey,

You can simply use as following

Data: date type sy-datum.

date = date + 100.

Hope this helps.

Thanks

Naresh

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.

6 REPLIES 6
Read only

Former Member
0 Likes
3,220

Hi , use BKK_ADD_WORKINGDAY.

Krishna

Read only

Former Member
0 Likes
3,220

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

Read only

Former Member
0 Likes
3,220

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

Read only

Former Member
0 Likes
3,220

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

Read only

Former Member
0 Likes
3,221

Hey,

You can simply use as following

Data: date type sy-datum.

date = date + 100.

Hope this helps.

Thanks

Naresh

Read only

Former Member
0 Likes
3,220

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