SAP ABAP - If Statement


Advertisements

‘IF’ is a control statement used to specify one or more conditions. You may also nest the IF control structures in an ABAP program.

The following syntax is used for the IF statement.

IF<condition_1>.
  
<Statements...>.
  
ENDIF.

If the expression evaluates to true, then the IF block of code will be executed.

Flow Diagram

If Statement

Example

Report YH_SEP_15.  
Data Title_1(20) TYPE C.
Title_1 = 'Tutorials'.  
IF Title_1 = 'Tutorials'.  
write 'This is IF statement'.  
ENDIF.

The above code produces the following output −

This is IF statement.
sap_abap_decisions.htm

Useful Video Courses


Video

SAPUI5 Online Training

25 Lectures 6 hours

Sanjo Thomas

Video

SAP Webi Online Training

Most Popular

26 Lectures 2 hours

Neha Gupta

Video

SAP Basis Online Training

30 Lectures 2.5 hours

Sumit Agarwal

Video

SAP C4C Online Training

30 Lectures 4 hours

Sumit Agarwal

Video

SAP MM Online Training

14 Lectures 1.5 hours

Neha Malik

Video

SAP WM Online Training

13 Lectures 1.5 hours

Neha Malik

Advertisements