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

help needed

Hi expert,

i have written this code to fetch data from knvp table

select kunnr parvw kunn2 vkorg

from knvp

into table i_knvp

for all entries in i_knb1

where vkorg = p_vkorg

and parvw = 'RG'.

but it shows syntax error : The WHERE condition does not refer to For All entries table.

please guide me how to write select statement.

Thanks,

venkat

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 07:00 AM

    select kunnr parvw kunn2 vkorg

    from knvp

    into table i_knvp

    for all entries in i_knb1

    where vkorg = <b>i_knb1-vkorg</b>

    and parvw = 'RG'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 07:08 AM

    Hi Venkat,

    when u r using for all entries first u should check for initiality.

    write the code as

    if not i_knb1[] is initial.

    select kunnr parvw kunn2 vkorg

    from knvp

    into table i_knvp

    for all entries in i_knb1

    where vkorg = i_knb1-vkorg

    and parvw = 'RG'.

    endif.

    Regards,

    nagraj

    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.