IF is a keyword used in SAP ABAP programming.
This tutorial covers its introduction & syntax details.
Used for case distinction.
on whether the logical expression logexp is true or not, this statement triggers
the execution of various sections of code enclosed by IF and ENDIF
There are three different types:
If the logical expression is true,
processing1 is executed. Otherwise, the program resumes immediately after ENDIF
logical expression is true, processing1 is executed. Otherwise, processing2 is
executed (see ELSE ).
If the logexp1 is false,
logexp2 is evaluated and so on. You can use any number of ELSEIF statements. If
an ELSE statement exists, it always appears after all the ELSEIF
All IF statements must be concluded in the same
processing block by ENDIF .
IF statements can be nested as mayn times as you
The IF statement does not directly affect the selection. For this
purpose, you should use the CHECK statement.