EXIT in loops and modularization units


Basic form

EXIT.

Effect


Example

TABLES T100. DATA SAP_COUNT TYPE I. SELECT * FROM T100 WHERE SPRSL = SY-LANGU AND ARBGB = 'DS'. WRITE / T100-TEXT. IF T100-TEXT CS 'SAP'. ADD 1 TO SAP_COUNT. IF SAP_COUNT = 3. EXIT. ENDIF. ENDIF. ENDSELECT.

Note

If there are several nested loops, the effect of EXIT is only to leave the current loop. Processing continues after the next END... statement in the next loop up.
Related CONTINUE , CHECK , REJECT , STOP

Index
� SAP AG 1996 1
Hosted by www.Geocities.ws