SAP ABAP - Check Statement


Advertisements

CHECK statement terminates a loop pass based on a condition. If the condition in the CHECK statement is evaluated to false then all the remaining statements in the statement block after the CHECK statement are ignored, and the next loop pass starts. The condition in the CHECK statement can be any logical expression.

The syntax for check statement is −

CHECK.

Example

Report YH_SEP_15.  
DO 5 TIMES.  
CHECK SY-INDEX BETWEEN 3 AND 4.  
Write / SY-INDEX.  
ENDDO.

The above code produces the following output −

3
4
sap_abap_loop_control.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