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: 

Function module to add the number of days

0 Kudos

As i got a requirement to add no of days using function module in scripts.If any one have an idea pls provide me

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Bhaskar,

Use the following FUNCTION MODULE..OK..In this we have to mention Stating data ok..

FUNCTION MODULE:

HR_COV_COUNT_DAYS_WITH_OBEGD.

Award points if helpful.

Kiran Kumar.G

4 REPLIES 4

Former Member
0 Kudos

Hi Bhaskar,

Use the following FUNCTION MODULE..OK..In this we have to mention Stating data ok..

FUNCTION MODULE:

HR_COV_COUNT_DAYS_WITH_OBEGD.

Award points if helpful.

Kiran Kumar.G

Former Member
0 Kudos

Hi Bhaskar,

check this way.

u can add the number of days directly no need of any FM.

data:dat type sy-datum.

data:new_dat type sy-datum.

data:days(2) type n value '10'.

dat = sy-datum.

new_dat = dat + days.

write:/ new_dat.

(or)

fm: RE_ADD_MONTH_TO_DATE

Import parameters Value

MONTHS 1

OLDDATE 12/03/2007

Export parameters Value

NEWDATE 01/03/2008

(or)

just add the no of days to your date, it will take care.

Data:

l_datum like sy-datum.

l_datum = sy-datum + 50.

write:/ l_datum.

kindly reward if helpful.

cheers,

Hema.

Former Member
0 Kudos

Hi,

Please use FM CALCULATE_DATE.

Thanks,

Sriram Ponna.

Former Member
0 Kudos

Hi

Try this FM ADD_TIME_TO_DATE

Give D for the parameter I_IPRKZ and

No of days to be added for I_TIME.

Hope this Helps.

Praveen