반복문 바깥에서 사용 시 오류가 발생한다.
SELECT *
FROM scarr
INTO TABLE @DATA(lt_data)
UP TO 10 ROWS.
LOOP AT lt_data INTO DATA(ls_data).
IF SY-TABIX EQ 3.
CONTINUE.
ENDIF.
WRITE : / sy-tabix.
ENDLOOP.
SELECT *
FROM scarr
INTO TABLE @DATA(lt_data)
UP TO 10 ROWS.
LOOP AT lt_data INTO DATA(ls_data).
IF SY-TABIX EQ 3.
EXIT.
ENDIF.
WRITE : / sy-tabix.
ENDLOOP.
PERFORM sub.
WRITE : / 'END'.
FORM sub.
EXIT.
WRITE : / 'PERFORM TEST'.
ENDFORM.
START-OF-SELECTION.
STOP.
WRITE : / 'START-OF-SELECTION'.
END-OF-SELECTION.
WRITE : / 'END-OF-SELECTION'.
START-OF-SELECTION.
PERFORM get_data.
END-OF-SELECTION.
WRITE : / 'END-OF-SELECTION'.
FORM get_data.
check ABAP_FALSE = ABAP_TRUE.
WRITE : / 'GET_DATA'.
ENDFORM.