DATA str_c TYPE string.
DO 15 TIMES.
"Continue with the next loop pass if the number is even
"Terminating the loop pass and continuing with the next loop pass if the condition specified
"with the IF statement is true (if the number is even)
IF sy-index MOD 2 = 0.
CONTINUE.
ELSE.
str_c = |{ str_c }{ COND #( WHEN str_c IS NOT INITIAL THEN `, ` ) }{ sy-index }|.
ENDIF.
ENDDO.
"str_c: 1, 3, 5, 7, 9, 11, 13, 15
Serkan AKKAVAK
Computer Engineer BSc
SAP Department Manager
Contact : serkurumsal@yandex.com
0 Comments