on 10-09-2007 12:33 PM
HI,
i need to build a period table like if i have in input 01.10.2007
until 31.10.2007
the table sould look like that.
itab
01.10.2007
02.10.2007
03.10.2007
04.10.2007
....
31.10.2007
what is the best way to do that?
Regards
Hi Tal,
try it:
DATA: BEGIN OF ti_date OCCURS 0,
date TYPE sy-datum,
END OF ti_date,
date1 TYPE sy-datum VALUE '20070901',
date2 TYPE sy-datum VALUE '20071030',
date(4).
date = date2 - date1 + 1.
DO date TIMES.
WRITE: / date1.
ti_date-date = date1.
APPEND ti_date.
date1 = date1 + 1.
ENDDO.
Regards,
Allan Cristian
Message was edited by:
Allan Cristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi TAL,
this small routine will give the result you wish:
DATA : BEGIN OF period OCCURS 0,
day TYPE sy-datum,
END OF period.
DATA : gv_day TYPE sy-datum.
START-OF-SELECTION.
gv_day = '20071001'.
period-day = gv_day.
WHILE gv_day4(2) EQ period-day4(2).
APPEND period.
period-day = period-day + 1.
ENDWHILE.
hope this helps
ec
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.