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: 

Report to get dates,

201

User giving one date for example 21.12.2019 as an input.

Is there any way to get all date from

the first date of a month to 21.12.2019 ?

2 REPLIES 2

inbox_sheo
Discoverer
110

First fetch the month number and date through offset.

Then use

do (date value) times .....

Ends. And append the date.month.year to input date.

LV_DATE = 21.

LV_MONTH = 12.

DO 21 TIMES.

ENDDO.

former_member602690
Active Participant
0 Kudos
110

report trackdates.

data:

gt_date type sy-datum occurs 0,

gd_today type sy-datum,

gd_tomorrow type sy-datum.

*

data: gd_date type string,

gd_yyyy(4),

gd_mm(2),

gd_dd(2).

*

move sy-datum to: gd_today, gd_date.

gd_tomorrow = sy-datum + 1.

gd_dd = 01.

append gd_date to gt_date.

*

do until gd_date = gd_tomorrow.

add 1 to gd_date.

if gd_date <= sy_datum.

append gd_date to gt_date.

else.

exit.

endif.

enddo.