SAP Tutorials Blog


 


EXIT Statement: The EXIT statement allows you to exit a loop prematurely when a certain condition is met.

DATA lv_value TYPE i VALUE 1.

DO 10 TIMES.

  IF lv_value > 5.

    EXIT.

  ENDIF.

  WRITE lv_value.

  ADD 1 TO lv_value.

ENDDO.


Serkan AKKAVAK

Computer Engineer BSc

Head of SAP & Software Department

Contact : serkurumsal@yandex.com