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

syntax error!

hi,

i got the synatx error for the following code!

select

vbak~vbeln

vbak~submi

vbak~bstdk

vbak~bstnk

vbap~vgpos

from vbak inner join vbap on vbakvbeln = vbapvbeln

into table lt_vbak

for all entries in lt_lips

where vbeln = lt_lips-vgbel

and vgpos = lt_lips-vgpos.

and i had declared internal table lt_vbak with the five fields as i had mentioned!

whats wrong with this code?

Raj

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Apr 11, 2008 at 06:32 AM

    What did the syntax error message say?

    matt

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 06:34 AM

    When u use inner joins u need to specify the table in the where condition if the field exists in the both the tables. So put like this:

    select

    vbak~vbeln

    vbak~submi

    vbak~bstdk

    vbak~bstnk

    vbap~vgpos

    from vbak inner join vbap on vbakvbeln = vbapvbeln

    into table lt_vbak

    for all entries in lt_lips

    where vbak~vbeln = lt_lips-vgbel

    and vbap~vgpos = lt_lips-vgpos.

    Thanks,

    Anon

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 06:42 AM

    when you use inner join betweeen 2 tables, then in the where condition you need to specify from which table you want to retrieve the fields..

    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.