2010 Feb 19 5:15 AM
Hi friends,
I have one issue. Avtually i have a
SELECT-OPTION: Date FOR j_1iexchdr.
we shall give 01.02.1010 TO 10.02.2010.
The date should be printed horizontally at output.
like :
transporter name 01.02.2010 02.02.2010 03.02.2010 04.02.2010 ................................10.02.2010
These date should be dynamically increased corresponding to input of date.
Regards,
Swapnika
Edited by: Swapnika Panse on Feb 19, 2010 6:17 AM
2010 Feb 19 5:33 AM
Hi Swapnika,
I think you can use a WHILE loop for this as follows:
data: v_date type sy-datum.
v_date = sel_option-low.
while v_date <= sel_option-high.
write: v_date.
v_date = v_date + 1. "will increment date correctly
endwhile.
Hope this helps! Please revert if you need anything else.
Cheers,
Shailesh.
Always provide feedback for helpful answers
2010 Feb 19 5:27 AM
hi,
Write your date without the next line in the loop.
loop
write : v_date.
endloop.
regards
Ritesh
2010 Feb 19 5:33 AM
Hello,
I think this should work:
DATA:
V_DATE TYPE DATUM,
V_COL TYPE I.
WRITE: S_SATE-LOW.
DO.
V_DATE = S_DATE-LOW + 1.
V_COL = V_COL + 10.
WRITE AT V_COL V_DATE.
IF V_DATE LE S_DATE-HIGH.
EXIT.
ENDIF.
ENDDO.BR,
Suhas
2010 Feb 19 5:33 AM
Hi Swapnika,
I think you can use a WHILE loop for this as follows:
data: v_date type sy-datum.
v_date = sel_option-low.
while v_date <= sel_option-high.
write: v_date.
v_date = v_date + 1. "will increment date correctly
endwhile.
Hope this helps! Please revert if you need anything else.
Cheers,
Shailesh.
Always provide feedback for helpful answers
2010 Feb 19 6:22 AM
see the below code for your requirement.
SELECT-OPTIONS: s_date FOR sy-datum.
DATA: gv_date TYPE sy-datum.
gv_date = s_date-low.
WRITE: gv_date.
WHILE gv_date LT s_date-high.
gv_date = gv_date + 1.
WRITE: gv_date.
ENDWHILE.
It will give u the same output as you want.
2010 Feb 19 6:24 AM
WRITE: gv_date.Infact it will give only one date as output. The remaining dates will be overwritten
Write this code in the editor & try.
Cheers,
Suhas
2010 Feb 19 7:00 AM
Hi ,
You can try the following code fragment.
select-options : so_date for sy-datum.
data: lv_date type sy-datum,
lv_date2(10) type c,
lv_date1 type string.
lv_date = so_date-low.
while lv_date LE so_date-high.
write lv_date to lv_date2.
concatenate lv_date1 lv_date2 into lv_date1 separated by space.
call function 'BKK_ADD_WORKINGDAY'
exporting
i_date = lv_date
i_days = 1
importing
e_date = lv_date.
endwhile.
write lv_date1.
Regards,
Kiran