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: 

How can i get 10 or 20 days older date from sy-datum.

Former Member
0 Kudos
536

i have to get some date from the existing date or sy-datum. how to get it.

Ex: today-10/11/2006.

20 days back---21/10/2006.

4 REPLIES 4

Former Member
0 Kudos
137

Hi

DATA: OLD_DAY_10 LIKE SY-DATUM,

OLD_DAY_20 LIKE SY-DATUM.

OLD_DAY_10 = SY-DATUM - 10.

OLD_DAY_20 = SY-DATUM - 20.

Max

anversha_s
Active Contributor
0 Kudos
137

hi,

chk this.

data : wa_date type sy-datum.
 
call function 'RP_CALC_DATE_IN_INTERVAL'
exporting
date = sy-datum
days = 20 --------------------> give ur required date
months = 0
years = 0
signum = '-'
importing
calc_date = wa_date.
 
write 😕 wa_date. -> new minised date

<b>Note

signum = '+' "

signum = '-' "</b>

Regards

Anver

Former Member
0 Kudos
137

hi,

data: date like sy-datum.

date = sy-datum - 10.

regards,

Priya.

Former Member
0 Kudos
137

Hi dasr r ,

See this code,

DATA: V_DATE LIKE SY-DATUM.

V_DATE = SY-DATUM.

V_DATE = V_DATE - 10.

WRITE V_DATE.

Regards,

Abdul

P.S: Mark Points, if useful!