SAP IF ABAP Statements
Warning: Undefined variable $saptab in /customers/b/9/9/trailsap.com/httpd.www/abap-statements/index.php on line 46Get Example source ABAP code based on a different SAP table
Standard SAP Help for IF
IF
• IF ABAP Statement
ABAP Syntax
What does it do? These statements define a control structure which can contain multiple statement blocks
After
The logical expressions, beginning with the
When the end of the statement block is reached or if no statement block is to be executed, the processing is continued after
Latest notes: Furthermore, the
Example ABAP Coding
Converts a time output into the 12-hour format (see also
fltime = sy-time.
IF time <(><<)> '120000'.
cl_demo_output=>display(
|{ time TIME = ISO } AM| ).
ELSEIF time > '120000' AND
time <(><<)> '240000'.
cl_demo_output=>display(
|{ CONV t( time - 12 * 3600 ) TIME = ISO } PM| ).
ELSE.
cl_demo_output=>display(
|High Noon| ).
ENDIF.
See also the example for
Return to menu