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: 

please explain

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

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

4 REPLIES 4

raymond_giuseppi
Active Contributor
0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

now how can i replace this old select statement with a new one by using into table key word by incorporating these two check statements