04-11-2008 7:26 AM
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
04-11-2008 7:32 AM
04-11-2008 7: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
04-11-2008 7: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..