Application Development 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: 

hi

Former Member
0 Kudos

i would like to know different check statemants?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Pradeep,

There is only one check statement in SAP.

CHECK.

You can consider this as a IF statement without ENDIF.

The difference is if the condition given in the CHECK fails then it will not check the next statements in that processing block,the processing block can be a loop or subroutine or event.

Reward points if useful.

Regards,

Atish

6 REPLIES 6

Former Member
0 Kudos

Hi Pradeep,

There is only one check statement in SAP.

CHECK.

You can consider this as a IF statement without ENDIF.

The difference is if the condition given in the CHECK fails then it will not check the next statements in that processing block,the processing block can be a loop or subroutine or event.

Reward points if useful.

Regards,

Atish

Former Member
0 Kudos

Hi Pradeep,

When a user enters values into the selection screen, those values are used as criteria when the logical database returns data to the calling program.Only rows f data that meet the criteria specified by the user will be retirned.

If other parameters are present in the program using logical database, they will be added to the end of selection screen. This works well for entering criteria at runtime, but what if a pgm is required to apply criteria to the rows processed - without a user entering criteria at run time ? the basic way to accomplish this is by using a CHECK statement.

CHECK includes conditional statement: if condition fails, CHECK acts like an EXIT.

CHECK command is used for logical database. There is no other different CHECK statements.

Reward if helpful.

Regards

Raghavendra.D.S

Former Member
0 Kudos

Hi Pradeep,

Are you asking about control statements or check statements.

There is only one check statement in SAP.

CHECK.

You can consider this as a IF statement without ENDIF.

The difference is if the condition given in the CHECK fails then it will not check the next statements in that processing block,the processing block can be a loop or subroutine or event.

Reward points if useful.

Regards,

Tharanatha H

Former Member
0 Kudos

You can consider this as a IF statement without ENDIF.

The difference is if the condition given in the CHECK fails then it will not check the next statements in that processing block,the processing block can be a loop or subroutine or event.

mohammed_moqeeth
Active Participant
0 Kudos

Hi Pradeep,

<b>CHECK</b> key checks the condition,

<b> if the condition is true then it will go to next line of code.

if the condition is false then it will skip the current processing block.</b>

I hope you get it.

<b>Rewards Points... if you feel useful.

Cheers !

Moqeeth.</b>

Former Member
0 Kudos

Hi

Different Check statements are:

1. checking the Sy-SUBRC field value (if sy-subrc = 0....endif)

2. Using the keyword CHECK

check itab-kunnr <> 0.

this is similar to the command

if itab-kunnr <> 0...endif.

3. STOP... goes to end-of-selection

4.EXIT... comes out of the Loop pass. event...

5. CONTINUE....To skip that particular Loop pass

Reward points for useful Answers

Regards

Anji