DO

From Abap2Java

(Redirected from ENDDO)
Jump to: navigation, search

Unconditional loop.

Image:Dotright.JPG ABAP

DO repeats any ABAP statements. DO n TIMES repeats the statements n times. Inside the DO Block, the system field sy-index has the number of currently processed loops.

DO.
  lv_counter = lv_counter * 2.
  IF lv_counter > 1024.
    EXIT.
  ENDIF.
ENDDO.
DATA lv_n TYPE i.
DO lv_n TIMES.
  WRITE sy-index.
ENDDO.

See also
WHILE, LOOP, Control Flow

Image:Dotleft.JPG Java

Unconditional loops are done with for.
See also
do, while, Control Flow

Retrieved from "http://www.abap2java.com/DO"
Personal tools