on 02-20-2014 5:00 AM
Need urgent advise on SQVI left join.
I am trying to link Purchasing Document Header with Delivery Item with Shipment Item and Header table. The purpose is to have all the PO/STO records with the corresponding shipment details. As there might be less records in the shipment table and all PO records will be need, I include an outer left join between LIPS and VTTP. I got what I want to have the PO records, DN number and shipment number, shipment number will be blank if there are no record. The issue arise when I add the VTTK table inner join with the VTTP, which is not returning any records. Can anyone pls tell me what have I done wrong?
Here is the join condition:
EKKO (EBELN) inner join EKPO (EBELN)
EKPO (EBELN, MATNR) inner join LIPS (MATNR, VGBEL)
LIPS (VBELN) left outer join VTTP (VBELN)
VTTP (TKNUM) inner join VTTK (TKNUM)
Please don't take matnr as key field and also take the posnr in to consideration, try to take all the key fields in SQVI.
hope this will solve your query.
Regards,
Abdul Rahim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your prompt reply.
Can you please elaborate more? I need to join the matnr as it relates the correct material number to the correct delivery item. And what field does POSNR be linked to when the Item no. in EKPO and VTTP actually do not match?
All I need are the PO by material with qty and net price, plus the Tracking No (TNDR TRKID) in VTTK. I don't really need anything in the delivery table. They are just for the linkage.
Hi, below is the requirement:
1) PO/STO info: PO no, Plant, Material No, Qty placed, Net price
2) Shipment info: Shipment no, Shipment Tracking ID
As there might be 100 PO/STO in the EKKO table, not all of them has created shipment, so I will need to have all the 100 PO/STO down to materials, with the corresponding shipment/Tracking No. The Shipment no can be blank if there is no relevant record.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.