If the EXIT statement is listed within a loop, it leaves the loop by ending the current loop process. Program execution is continued after the closing statement in the loop.
Outside of a loop, the EXIT statement leaves the current processing block (see EXIT - Processing block). We recommend that you use EXIT within loops only.
Leaving a loop with EXIT if the loop index sy-index is greater than a number limit.
DATA limit TYPE i VALUE 10.
IF sy-index > limit.
WRITE / sy-index.