Application Development 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: 

syntax error!

Former Member
0 Kudos

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

3 REPLIES 3

matt
Active Contributor
0 Kudos

What did the syntax error message say?

matt

Former Member
0 Kudos

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

Former Member
0 Kudos

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..