代码语言:javascript复制
*&---------------------------------------------------------------------*
*& Report Z9
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z9.
DATA num TYPE i.
num = 10.
DO num TIMES.
WRITE: / 'dowhile第', sy-index , '次循环'.
ENDDO.
ULINE.
DO .
WRITE: / '现在是第',sy-index,'次循环'.
IF sy-index = 8.
exit.
ENDIF.
ENDDO.
ULINE.
DATA i type i.
i = 0.
WHILE i < 10.
WRITE: / 'while第',sy-index,'次循环'.
i = i 1.
ENDWHILE.