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

Yesterday

Former Member
0 Likes
746

Is there some function that show me the yesterday date??

Sorry for my English

Thanks a lot.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
700

Hi julio,

1. just use

2. newdate = mydate - 1.

regards,

amit m.

Is there some function that show me the yesterday date??

Sorry for my English

Thanks a lot.

5 REPLIES 5
Read only

Former Member
0 Likes
701

Hi julio,

1. just use

2. newdate = mydate - 1.

regards,

amit m.

Read only

0 Likes
700

yestdat = today - 1.

CALL FUNCTION 'DATE_COMPUTE_DAY'

EXPORTING

DATE = yestdat

IMPORTING

DAY = day_of_week_num

EXCEPTIONS

OTHERS = 8.

CASE day_of_week_num.

WHEN 1.

hold_day_of_week = 'Monday'.

WHEN 2.

hold_day_of_week = 'Tuesday'.

WHEN 3.

hold_day_of_week = 'Wednesday'.

WHEN 4.

hold_day_of_week = 'Thursday'.

WHEN 5.

hold_day_of_week = 'Friday'.

WHEN 6.

hold_day_of_week = 'Saturday'.

WHEN 7.

hold_day_of_week = 'Sunday'.

WHEN OTHERS.

hold_day_of_week = 'invalid'.

ENDCASE.

Read only

abdul_hakim
Active Contributor
0 Likes
700

hi use the below code.

data: todaysdate like sy-datum,

yesterday like sy-datum.

todaysdate = sy-datum.

yesterday = todaysdate - 1.

write yesterday.

Cheers,

Abdul

Mark all useful answerz...

Read only

Former Member
0 Likes
700

Check the code below.

report ZDATE.

data:  yest like sy-datum.

     yest = sy-datum - 1.
     write yest.

Cheers,

Thomas

Read only

Former Member
0 Likes
700

Thanks all!!!