ABAP Keyword Documentation → ABAP - Reference → Calling and leaving program units → Exiting Program Units → Exiting Loops
CONTINUE
Other versions: 7.31 | 7.40 | 7.54
Syntax
CONTINUE.
Effect
The CONTINUE
statement can only be used in
loops. If it is used, the current loop pass is ended immediately and the program flow is continued with the next loop pass.
Example
A loop pass is exited using CONTINUE
if the loop index sy-index
is an odd number.
DATA remainder TYPE i.
DO 20 TIMES.
remainder = sy-index MOD 2.
IF remainder <> 0.
CONTINUE.
ENDIF.
WRITE / sy-index.
ENDDO.