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

Former Member
0 Likes
968

Hi a small doubt actally i have entered a field in the selection screen as parameters ie) s_bugjah LIKE t009b-bdatj .I have to use this value s_bugjah in the select stmt for where codn but its showing an error "The IN operator with "S_BUGJAH" is followed neither by an internal

table nor by a value list."please help to correct this error

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
932

If ur declaring a parameter ie:

parameters s_bugjah LIKE t009b-bdatj.

then u shoul go for = rather than IN in the where condition.

If ur using IN it must be a select-option.

10 REPLIES 10
Read only

GauthamV
Active Contributor
0 Likes
932

hi,

u have to use in only for select options.

use this.

ex: bukrs eq p_bukrs.

Edited by: gautham chakraverthi on Aug 29, 2008 3:38 PM

Read only

Former Member
0 Likes
932

You will have to use SELECT-OPTIONS not PARAMETERS for this requirement. The IN condition only works for select-options in the select query.

Declare it as,

SELECT-OPTIONS: s_bugjah FOR t009b-bugjah.

Read only

Former Member
0 Likes
932

Hi,

Could you please paste your code?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
932

Hello,

Plz try this:


SELECT-OPTIONS: S_BUGJAH FOR t009b-bugjah.

Use this in the select stmt with IN.

BR,

Suhas

Edited by: Suhas Saha on Aug 29, 2008 12:09 PM

Read only

Former Member
0 Likes
933

If ur declaring a parameter ie:

parameters s_bugjah LIKE t009b-bdatj.

then u shoul go for = rather than IN in the where condition.

If ur using IN it must be a select-option.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
932

when 'IN' statement then donot declare as parameters gor for

select-options

or give EQ in where clause

Read only

Former Member
0 Likes
932

HI ,

U cannot use IN for parameter statement > if U want to use then declare it as select-options :s_bugjah FOR t009b-bdatj .

Read only

Former Member
0 Likes
932

Hi Saranya,

Just check your select statement and in the where condition when you are checking the field CODN put the sign '=' instead of 'IN'. The issue will be solved. For example :

parameters :
  s_bugjah LIKE t009b-bdatj.

select <field names>
    from t009b
    into itab
 where codn = s_bugjah.

Regards,

Swapna.

Read only

Former Member
0 Likes
932

Hello

If s_bugjah is declared as parameter, you must use

EQ S_BUGJAH in select statement.

Read only

Former Member
0 Likes
932

Hi,

If you have declared the parameter using key word

PARAMETERS, then use = in the WHERE condition

or

SELECT-OPTIONS, then use IN in the WHERE condition

Regards,

Kunjal