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-OPTIONS and data collection

pradeepmathewch
Product and Topic Expert
Product and Topic Expert
0 Likes
637

Hi All,

I have one inputfield (say users) via SELECT-OPTIONS and it goes to an internal table called "userlist" with values USER1, USER2 etc...(Example)

Now, when I query the database with "userlist" as the input, I'm not able to do so because SELECT-OPTIONS contains an Internal table with values LOW, HIGH etc...

So my input value goes like this IEQUSER1, IEQUSER2 etc......

Could anyone tell me what should I do in order to get USER1, USER2 etc.

Thanks in advance,

Pradeep

4 REPLIES 4
Read only

Former Member
0 Likes
609

Hi pradeep,

1. Exactly for this purpose, we have to use

IN

in the select query, intead of =.

2. In your case

select * from dbtab

where field IN SELOPTION.

regards,

amit m.

Read only

Former Member
0 Likes
609

HI,

IN selection-Screen click the Extenction Button

and give ur input.

Regards,

S.Nehru

Read only

Former Member
0 Likes
609

Hi,

code like this.

select-options user for table-user.

select * from table where user in user.

regards,

V.Balaji

Reward if usefull

Read only

0 Likes
609

Hi All,

Sorry. I'm getting the error: 'Line structure of table USERLIST is incorrect'.

My coding is as follows:

tables : usr02.

data: begin of users,

users type XUBNAME,

end of users.

data : it_usr02 like table of usr02.

data : l_userlist type xubname, "This is a data elemnt thats already in the system of type BNAME

p_userlist like l_userlist.

select-options: userlist for users.

loop at userlist into l_userlist.

select * from usr02 into corresponding fields of table it_usr02 where bname in userlist.

endloop.

ENDFUNCTION.

Could you please help?

Thanks and Regards, Pradeep