loop at it_record. if it_record-key = '39'. "here i have to use the syntax for next line continue. " Else use read statement READ IT_RECORD into wa_record index sy-tabix. endif. endloop.
hi,
you can reach the next line through sy-tabix (whihc contains the current line) + 1 :
DATA : next TYPE sy-tabix.
LOOP AT it_record.
next = sy-tabix + 1.
IF it_record-key EQ '39'.
read next line
READ TABLE it_record INTO ... INDEX next
change next line
MODIFY TABLE it_record FROM ... INDEX next.
ENDIF.
ENDLOOP.
hope this helps
ec
Hi ,
If you want to move to next line in the loop processing you have to assign sy-tabix value to some local variable and you just increment.
LOOP AT it_record.
IF it_record-key = '39'.
"here i have to use the syntax for next line
v_indx = sy-tabix + 1.
CLEAR : it_record.
READ TABLE it_record INDEX v_indx.
IF sy-subrc = 0.
"Your code
ENDIF.
ENDIF.
ENDLOOP.
Or you can use below code to skip 39th record.
LOOP AT it_record.
IF it_record-key = '39'.
"here i have to use the syntax for next line
Continue.
ENDIF.
ENDLOOP.
-> set a flag:
if it_record-key = '39'. xflag = X. endif.
so in next loop you can ask:
if xflag = x.
...
do not forget to clear xflag!
A.
Add a comment