Friday, 17 November 2017

ABAP – Check Statement


            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

indetail check statement

No comments:

Post a Comment