Skip to Content

SELECT-OPTIONS and data collection

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2008 at 10:19 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2008 at 10:19 AM

    HI,

    IN selection-Screen click the Extenction Button

    and give ur input.

    Regards,

    S.Nehru

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2008 at 10:19 AM

    Hi,

    code like this.

    select-options user for table-user.
    
    select * from table where user in user.

    regards,

    V.Balaji

    Reward if usefull

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.