These statements define a control structure which can contain multiple statement blocks
of which a maximum of one will be executed in conjunction with logical expressions
ELSEIF any logical expressions
log_exp can be executed while the expressions
statement_block stand for any statement blocks.
The logical expressions, beginning with the
IFstatement, are checked from
top to bottom and the statement block after the first is executed during the logical expression. If
none of the logical expressions are true, the statement block after the
ELSE statement is executed.
When the end of the statement block is reached or if no statement block is to be executed, the processing is continued after
Converting a time output into the 12-hour format (see also country-specific formats).
DATA time TYPE t. fltime = sy-time. IF time < '120000'. WRITE: / time, 'AM' . ELSEIF time > '120000' AND time < '240000'. time = time - 12 * 3600. WRITE: / time, 'PM' . ELSE. WRITE / 'High Noon'. ENDIF.