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

Regarding date

Former Member
0 Likes
540

HI all,

I like to calculate date which less than 90 days of current day.

No.of days = s_date-low - 90

Please give suggestion

Please give code.

Thanks

venkat

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
527

Hello,

Do it the


select-options: s_date for sy-datum.
INITIALIZATION
s_date-sign = 'I'.
s_date-option = 'BT'.
s_date-low =  sy-datum + 90.
s_date-high =  sy-datum .
append s_date

Cheers,

Vasanth

3 REPLIES 3
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
527

data:date type sy-datum

date = sy-datum - 90.

now date holds the date less than 90 days of current date.

Read only

Former Member
0 Likes
528

Hello,

Do it the


select-options: s_date for sy-datum.
INITIALIZATION
s_date-sign = 'I'.
s_date-option = 'BT'.
s_date-low =  sy-datum + 90.
s_date-high =  sy-datum .
append s_date

Cheers,

Vasanth

Read only

Former Member
0 Likes
527

Also you can use this FM to get both the days in future as well as teh past.

data: date     like sy-datum
     new_date like sy-datum
      date = sy-datum. " Pass the date for which u need to calculate
 

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = date
days = 04 "days added
months = 00
SIGNUM = '+'
years = 00
IMPORTING
CALC_DATE = new_date.
 

write:/ new_date.