Skip to Content
avatar image
Former Member

VBAK, VBAP, LIKP, LIPS, VBRP, VBRK and KNA1 Join infoset.

Hi. I have succesfully joined the above mentioned tables.



And finally


Now.. This is all working well, but my end output that I hope to achieve is to be able to enter either sales order, delivery number or billing number in either:

Header data field, showing header connection
Item data field, showing the full order, delivery and billing doc (all items in these)

Is this possible anyway? I am still quite new to creating queries, and at the moment, it seems to be showing header data, when I enter delivery number or billing number, but item data (several lines) when entering sales order.

Is the thing I want to achieve possible and is it something that can fairy easily be done in either changing the infoset or/and the layout of the query?

Thank you :)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 09, 2018 at 08:58 PM

    There is no "header connection" in SAP. Just look at the VBFA table keys, the whole document flow is at the item level.

    With these JOIN conditions (and if there is no other selection criteria or filters) you should get the same exact results as you would in SE16. Go to VBRP, find VGBEL/VGPOS, then take that to LIPS and find sales order from there. You should also be able to cross-check the results with VBFA table.

    In case if the sales order items have generated multiple deliveries and multiple billing documents, naturally, you'd see all the sales order items (and their subsequent documents) if you enter VBAK-VBELN. But if you enter VBRK-VBELN you'd see only the sales order item(s) that refer to it. The relationship between the sales document items and all the subsequent documents is "one to many". With hat in mind, I'm not sure what you're expecting to see as "header connection". At the item level the query seems to be working correctly.

    As a side note, this JOIN covers only the delivery-related billing scenario. In the order-related billing the document flow is different.

    P.S. Make sure to include all the item numbers (POSNR) in the infoset and query, then you'll see for sure what data is presented.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you Jelena.

      I will start reading more about SQL as well as the SAP blogs. I think I loose the overview from time to time on this, as it is all still very new and many things to keep in mind, but practice makes perfect. :)

      Have a great day! :)