Skip to content

ABAP Keyword Documentation →  ABAP − Short Reference 

IF - Short Reference

Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


IF log_exp1. 
  [statement_block1]
[ELSEIF log_exp2.
  [statement_block2]]
...
[ELSE.
  [statement_blockn]]
ENDIF.

Effect

Defines a control structure with several statement blocks statement_block1, ... statement_blockn. The statement block after the first true logical expression log_exp1, log_exp2, ... is executed. If no logical expression is true, the statement block after ELSE is executed.