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: 

tables link

Former Member
0 Kudos
79

Hi gurus,

How to find the sales document number vbak-vbeln based on likp-vbeln. How to link the tables vbak and likp.

Points will be awarded

Thanks

Ravi

4 REPLIES 4

Former Member
0 Kudos
53

Hi Ravi,

Check table VBFA for the document flow which will have link between sales order and delivery document.

You can get the sales document and line item from LIPS table. Give the delivery document to LIPS-VBELN and get the respective sales document and line item from the fields LIPS-VGBEL and LIPS-VGPOS respectively.

Thanks,

Vinay

Former Member
0 Kudos
53

Hi

Pass the VBEP-VBELN and POSNR to LIPS-VGBEL and LIPS-VGPOS fields

And join the LIKP and LIPS with the VBELN field

Regards

Sudheer

Former Member
0 Kudos
53

Hi

try like this

select vbak erdat ernam from vbak into corresponding fileds of it_vbak
where vbeln = it_likp-vbeln.

Or you can perform this by using inner join also

Reward all helpfull answers

Regards

Pavan

Former Member
0 Kudos
53

if you want to retrieve vbeln from vbak based on vbeln from likp

select vbeln from vbak into table i_vbak where vbeln = likp-vbeln.

if you want to rerieve vbeln from likp based on vbeln from vbak

select vbeln from likp into table i_likp where vbeln = vbak-vbeln.

regards,

srinivas

<b>*reward for useful answers*</b>