Skip to content

ABAP Keyword Documentation →  ABAP - Short Reference 

CASE - Short Reference

Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


CASE operand. 
  [WHEN operand1 [OR operand2 [OR operand3 [...]]].
    [statement_block1]]
  ...
  [WHEN OTHERS.
    [statement_blockn]]
ENDCASE.

Effect

Defines a control structure with multiple statement blocks statement_block1, ..., statement_blockn. The first statement block, for which the content of the operand operand is identical to one of the operands operand1, operand2, ... in the WHEN statement, is executed first. If no matches are found, the statement block is executed after the statement WHEN OTHERS.