Skip to Content
Technical Articles

What does DO/ENDDO do?

Dear community, for the little fun in between here’s some ABAP to check:

DATA lv_count TYPE i VALUE 1.

DO lv_count TIMES.
    lv_count = lv_count + 1.
    WRITE / 'What am I doing?'.

Simple question is: How often the loop is executed?

Possible answers:

  1. Once only.
  2. Over and over and over (never stops).

If you want to try it out quickly, you should use the transpiler by Lars Hvam. The right answer to the question above is available at


Best regards, thanks for reading and stay healty



P. S.: Not tired of reading blogs? Check this one about ADT element info. Really great!


You must be Logged on to comment or reply to a post.