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

SELECT query using SELECT-OPTIONS.

Former Member
0 Likes
588

Hi,

Scenario:

One main program and an include.

The SELECT-OPTIONS is declared in the main program and the SELECT query is being fired in the Include.

Declaration in the main program:

DATA:

gw_linv_tab TYPE linv.

SELECT-OPTIONS :

s_lgnum FOR gw_linv_tab-lgnum OBLIGATORY.

Inside Include:

SELECT lgnum

FROM t300

INTO TABLE lt_t300

WHERE lgnum IN s_lgnum.

Syntax error:

The IN operator with "S_LGNUM" is followed neither by an internal table

nor by a value list.

Can anybody please suggest what is that I am missing?

I have tried the same scenario in a test program and it works perfectly fine there.

Please help me to figure out the problem.

Regards

s@k

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
535

Hi

Make shure tht ur select option statment should be above the include program.

Example.

Select- options<>.

Include<> and write the code in ur include statement.

Regards

Rasheed

4 REPLIES 4
Read only

former_member329859
Participant
0 Likes
535

Hi,

Try to pass ur select option field in the anather globle defined field and write down that field in the where condition.

Bye

Gaurav

Read only

Former Member
0 Likes
535

Hi ..

Tried the same.. Didn't get any error..

Please make sure that your TOP include (Include where SELECT-OPTIONS declared) is active..

Nag

Read only

Former Member
0 Likes
536

Hi

Make shure tht ur select option statment should be above the include program.

Example.

Select- options<>.

Include<> and write the code in ur include statement.

Regards

Rasheed

Read only

0 Likes
535

Hi Rasheed,

Thanks a lot..:) it solved the problem.

Regards

s@k