2007 Sep 30 7:11 AM
]]I have a syntax:-
DO 3 TIMES.
ASSIGN COMPONENT SY-INDEX OF STRUCTURE <F1> TO <F2> .
WRITE <F2> .
ENDDO.My question is ,that instead if sy-index, could we use something like 1 2 ...etc?
2007 Sep 30 7:24 AM
SY_INDEX gets the value from loop pass.
First time DO loop gets executed, SY-INDEX will have value 1.
Second time DO loop gets executed, SY-INDEX will have value 2 and so on.
Now in a DO Loop how will you be able to use values 1 /2 / 3.
To avoid repetitive coding, DO Loop is used here.
Hope this helps. Please award points and close the thread if helpful.
2007 Sep 30 8:09 AM