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

Date function

Former Member
0 Likes
411

Im trying to find a function module that allows me to add dates to a current date. I would like the user to insert the number of days for shipping and have the program automatically calculate the delivery date based on SY-datum. Any help is appreciated. Thanks you for your time.

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
393

If you simply want to add calendar days, then you can do this.

data: new_date type sy-datum.
data: days type i value '7'.


new_date = sy-datum + days.

Regards,

Rich Heilman

Read only

gopi_narendra
Active Contributor
0 Likes
393

Check this

DATA: datum TYPE sy-datum.
datum = sy-datum + 45.

WRITE : datum.

Regards

Gopi

Read only

uwe_schieferstein
Active Contributor
0 Likes
393

Hello Cullen

Since you are posting your question in the OO forum I can recommend class <b>CL_RECA_DATE</b>.

Have a look at its several useful methods.

Regards

Uwe