CHECK log_exp.
If the statement CHECK is executed in a loop and log_exp is incorrect, the statement CHECK immediately terminates the current loop pass and the program continues with the next loop pass. For log_exp, you can specify any logical expression.
Outside a loop, the statement CHECK exits the current processing block (see CHECK Processing Block).
Termination of the loop pass using CHECK when the loop index sy-index is odd-numbered.
DATA remainder TYPE i.
DO 20 TIMES.
remainder = sy-index MOD 2.
CHECK remainder = 0.
WRITE / sy-index.
ENDDO.