2007 Aug 04 8:02 AM
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
2007 Aug 04 8:05 AM
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
2007 Aug 04 8:08 AM
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
2007 Aug 04 8:11 AM
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
2007 Aug 04 8:23 AM
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>