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

please explain

hi,

i got a select statement in my program as shown below

select * from ce4e001 where bukrs eq s_bukrs-low.

check s_kndnr.

check s_prctr.

move-corresponding ce4e001 to v_ce4e001.

append v_ce4e001.

endselect.

in this select statement you can see two check statements

where s_kndnr(customer) and s_prctr(profitcenter) are my selection screen fields

can any one tell me what is the exact meaning i mean why they have used those check statements before appending

thanks

ram

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Mar 25, 2008 at 08:50 AM

    The syntax CHECK select-option is equivalent to CHECK field IN select-option, if select-option is defined like SELECT-OPTIONS: select-option FOR field.

    The two checks , insure that all data appended to internal table has values in the ranges defined by the two select-options.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      CHECK - special for reports with logical databases

      1. CHECK sel.

      2. CHECK SELECT-OPTIONS.

      CHECK sel.

      Effect

      Checks the selection criterion requested by the statement

      SELECT-OPTIONS sel ... .

      This statement is equivalent to f IN sel , if sel was

      defined by SELECT-OPTIONS sel FOR f and can be used anywhere

      in logical expressions

      If the result of this check is negative, the processing in

      this event is terminated and the GET events for any

      subordinate database tables are not processed either.

      This variant of the CHECK statement should be used only if

      the logical database for the corresponding table does not

      support dynamic selections (see CHECK SELECT-OPTIONS ), or

      SELECT-OPTIONS with the addition NO DATABASE SELECTION .

      Otherwise, the relevant record is not read from the database

      and made available to the program.

      CHECK SELECT-OPTIONS.

      Effect

      Called only after a GET event.

      This statement checks all the selections for SELECT-OPTIONS

      where the reference field after FOR belongs to the current

      table dbtab (specified after GET . However, this applies

      only if the logical database for dbtab does not support

      dynamic selections . Otherwise, the selections are passed

      directly to the logical database (with the exception:

      addition " NO DATABASE SELECTION " to SELECT-OPTIONS ).

      This variant of the CHECK statement only makes sense if the

      logical database does not support dynamic selections for the

      corresponding table or SELECT-OPTIONS are defined with the

      addition " NO DATABASE SELECTION ".

      You can determine from the ABAP/4 Development Workbench

      whether dynamic selections are defined and, if so, for which

      logical database tables by selecting Development ->

      Programming environ. -> Logical databases followed by Extras

      -> Dynamic selections .

      rgds,

      bharat.

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2008 at 08:56 AM

    hi,

    CHECK is used for terminating the Loop Pass Conditionally .

    check s_kndnr.

    check s_prctr.

    here in the check statements when u give value in the selection screen fields, they check whether the values(kdnr,prctr) are present in the table ce4e001. if present then the following conditions are executed.

    if not nothing wiil be moved into v_ce4e001.

    so that only they have used those check statements before appending

    regards,

    sreelakshmi

    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.