2012 Jul 08 8:45 AM
hello Exceprts ,
i have a zreport in that i need to add a field to the search criteria i.e VBKD.IHREZ. so for that
I need to relate the tables VBRP & VBKD how to do that???
Moderator message: please do more research before posting, use meaningful subject lines when posting.
Message was edited by: Thomas Zloch
2012 Jul 08 8:59 AM
Hi Rajesh,
VBKD is part of the data of a sales order, not an invoice.
A sales order item given by VBAP-VBELN/POSNR can have either its own VBKD data: in this case, there is an own entry with VBKD-VBELN = VBAP-VBELN and VBKD-POSNR = VBAP-POSNR. If such an entry does not exist, then the VBKD data of the sales order header are valid fpr the item, i.e. the data of the record with VBKD-VBELN = VBAP-VBELN and VBKD-POSNR = '000000'.
You are mentioning that, finally, you are interested in VBRP records, which are invoice items, not sales order items (VBAP).
A sales order item gets delivered and invoiced. Invoices can be cancelled (the cancellation is another invoice item with a different billing type), and later a new invoice may be created w.r.t. the same order item. The relationship is recorded in the document flow table VBFA: VBELV/POSNV contain the key of the VBAP item, the order item, and VBELN/POSNN contain the key of a successive document item (delivery / invoice / others).
Hope this helps
Rüdiger