To Control The Flow of The ABAP Program Use The Following Statements
To Control The Flow of The ABAP Program Use The Following Statements
IF Branching Conditionally IF statement The code between IF and ENDIF is executed only if the condition is true.
DATA: a TYPE i VALUE 10. " We can assign a value in the declaration
Output
IF-ELSE statement The code between IF and ELSE is executed if the condition is true, the code between ELSE and ENDIF is executed if the condition is False.
DATA: a TYPE i VALUE 1. IF a > 5. WRITE:/ 'Condition True'. ELSE. WRITE:/ 'Condition False'. ENDIF.
Output
Output
Output