Skip to Content
0
Former Member
Dec 10, 2009 at 04:53 AM

SELECT query using SELECT-OPTIONS.

53 Views

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