Skip to Content
author's profile photo Former Member
Former Member

hi

i would like to know different check statemants?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2007 at 12:47 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 30, 2007 at 05:36 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 30, 2007 at 07:00 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 30, 2007 at 11:20 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 30, 2007 at 04:13 PM

    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>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 01, 2007 at 02:54 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.