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 problem...

Former Member
0 Likes
602

hi all,

i have a problem in getting a date. Requirement is,

Input: No of days say for example '50'.

i need to calculate the date 50 days nefore the sy-datum.

can anyone help me in this issue ?

Thanks in advance,

Prem.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
584

hi,

DATA: date1 TYPE sy-datum.

date1 = sydatum - 50.

Regards,

Raghavendra

5 REPLIES 5
Read only

Former Member
0 Likes
586

hi,

DATA: date1 TYPE sy-datum.

date1 = sydatum - 50.

Regards,

Raghavendra

Read only

Former Member
0 Likes
584

yes you ...can do as suggested by raghav...above..

a small correction in his code...

date1 = sy-datum - 50.

Read only

0 Likes
584

thanks for replying immdly,

i have a doubt though we have sy-datum - 50. no matter wat is the month it be subtracted right ???

Read only

0 Likes
584

yes...

no matter what month or year...

sy-datum - 50 will work properly...

Read only

Former Member
0 Likes
584

Use the FM

<b>CALCULATE_DATE</b>

This will clear ur query

Reward points if it does