Kontrollstrukturen (ABAP)
Aus MattWiki
IF…ELSEIF…ELSE…ENDIF.
CASE…WHEN…WHEN…WHEN OTHERS…ENDCASE.
DO…EXIT…ENDDO.
DO n TIMES... ENDDO.
WHILE…ENDWHILE.
SELECT…(ENDSELECT).
LOOP AT <lt_table> INTO <ls_structure>…ENDLOOP.
CASE
CASE lv_city.
WHEN 'Munich'.
" code for munich
WHEN 'Berlin'.
" code for berlin
WHEN 'Hamburg'.
" code for hamburg
WHEN 'Frankfurt'.
" code for frankfurt
WHEN OTHERS.
" code for any other
ENDCASE.