Skip to Content
author's profile photo Former Member
Former Member

Select statements

when I give in source code of function module the below statements:

SELECT vbeln bsark vtweg spart vdatu

FROM vbak

INTO TABLE itab WHERE

erdat IN s_erdat AND

vkorg IN s_vkorg AND

vtweg IN s_vtweg AND

bsark IN s_bsark AND

spart IN s_spart.

it shows the following error.

The IN operator with s_erdat is followed neither by an internal table nor by a value list.

Plz suggest what to do.

Plz reply it's urgent.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 07:17 PM

    Hi Ajay

    are you using this select query in Function module.If yes,then I guess you need to change the select query.IN operator is generally used with select-options.try

    SELECT vbeln bsark vtweg spart vdatu

    FROM vbak

    INTO TABLE itab WHERE

    erdat eq s_erdat AND

    vkorg eq s_vkorg AND

    vtweg eq s_vtweg AND

    bsark eq s_bsark AND

    spart eq s_spart.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 07:12 PM

    Remember this is for report selction screen not FM

    SELECT vbeln bsark vtweg spart vdatu

    FROM vbak

    <b>INTO CORRESPONDING FIELDS OF TABLE itab WHERE</b>

    erdat IN s_erdat AND

    vkorg IN s_vkorg AND

    vtweg IN s_vtweg AND

    bsark IN s_bsark AND

    spart IN s_spart.

    in FM you can use IN statement if you have table of selection otherwise you will have to use EQ instead of IN depending on the BR.

    Cheers

    A

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 07:16 PM

    S_ERDAT is not declared as either a select-option or range table. How did you declare it?

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 07:20 PM

    For FM you can use

    FOR ALL ENTRIES IN

    statement.

    A

    Add a comment
    10|10000 characters needed characters exceeded

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.