06-26-2008 11:58 AM
Hi Experts,
I am getting error in below code.
do 10 times.
write: sy-index.
enddo.
could you please suggest me what I can do for this. It is giving me error "Statement is not accessible." & error pointed in DO 10 times Statement.
Pls suggest.
06-26-2008 12:00 PM
its working
check it.
REPORT ZTEST.
do 10 times.
write: sy-index.
enddo.
06-26-2008 12:02 PM
hi,
plz check properly.same code i executed and got output from 1 to 10.
do 10 times.
write: sy-index.
enddo.
output : 1 2 3 4 5 6 7 8 9 10
06-26-2008 12:02 PM
06-26-2008 12:03 PM
Hi,
Your code is correct, i copied and pasted as it is, it is working fine, no error it is given.
06-26-2008 12:04 PM
Hi,
Its working fine.
do 10 times.
write: sy-index.
enddo.
o/p 1 2 3 4 5 6 7 8 9 10.
Plz check
May be ur do statement is not accessed .
I mean in ur code the do statement is not triggered.
hope this helps.
thanks,
dhanashri.
06-26-2008 12:05 PM
Hi,
Its working fine..
could u pls check if u have any else in your code before this... may be u hav missed out something in your previous statement...
Cheers,
Sai.
06-26-2008 12:05 PM
Check if you have ended the statement defoe "DO" statement.
ALso please try rewriting that part of code if you have done a copy paste.
Regards,
VIjay
06-26-2008 12:05 PM
There is nothing wrong with code there is problame with the logic where you put that code. May be related with events. Please look at that way.
Regars,
Swarup
06-26-2008 12:33 PM
hi,
the piece of code is fine but either you forget to give a period on the statement prior to this statement or you have placed it after the lasl sub routine.
If you placed it after last sub routine place it under any event.
Hope this will help.
reward if useful.
Regards
Sumit Agarwal
06-26-2008 12:42 PM
Neha,
might be you write this code out of scope.
see carefully and write it in event start-of-selection.
it should work
Amit.