Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

check statement

Former Member
0 Likes
453

hi,

can any body explain the importance of 'check' statement.

thank u in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
424
3 REPLIES 3
Read only

Former Member
0 Likes
425
Read only

0 Likes
424

CHECK evaluates the subsequent logical expression. If it is true, the processing continues with the next statement.

CHECK with a negative outcome terminates the current loop pass and goes back to the beginning of the loop to start the next pass, if there is one.

Outside loops, a CHECK with a negative outcome will cause you to exit the current processing block (event block, dialog module, procedure). During the reporting event GET, the system terminates the processing of the current entry, read by the logical database, and processes the next entry in the current node of the logical database. Nodes that are subordinate in the hierarchical structure of the logical database are not processed.

SAP recommends that you only use CHECK within loops. Use the RETURN statement to exit processing blocks.

You can use the REJECT statement to exit the reporting event GET conditionally.

Reward points if it helps

Regards

Gunjan

Read only

Former Member
0 Likes
424

Hi Srisaihari,

CHECK statement just evalutes logical expression and if it is true it will execute all statements under CHECK.If it is false then it just ignores the statements under it.

For simple understand CHECK is very similar to IF...ENDIF.

But it plays very significant role with LOGICAL DATABASES with SELECT-OPTIONS.

To know more about this, use the folloing link.

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/check_se.htm

Thanks,

Vinay