‎2007 Jan 25 7:44 PM
Hello, I need to construct a list of all billing documents that I choose and to obtain the sales order, delivery and accounting documents linked to this billing document.
Can anyone tell me which fields in the tables relate them? I need to do something simmilar to the doccument flow
TIA
‎2007 Jan 25 7:46 PM
Hi Scott,
Query on VBRP table which has fields gives us information about Sales order and Delivery.
VBRP-VGBEL - Delivery document number
VBRP-VGPOS - Line item of Delivery document
VBRP-AUBEL - Sales document number
VBRP-AUPOS - Line item of Sales document
Otherwise, You can query on VBFA table
Give invoice number to VBFA-VBELN and get the Sales order and Delivery numbers into field VBELV.
Specify VBTYP_V = 'C' to get Sales order and
Specify VBTYP_V = 'J' to get delivery numberr.
Thanks,
Vinay
‎2007 Jan 25 7:46 PM
Hi Scott,
Query on VBRP table which has fields gives us information about Sales order and Delivery.
VBRP-VGBEL - Delivery document number
VBRP-VGPOS - Line item of Delivery document
VBRP-AUBEL - Sales document number
VBRP-AUPOS - Line item of Sales document
Otherwise, You can query on VBFA table
Give invoice number to VBFA-VBELN and get the Sales order and Delivery numbers into field VBELV.
Specify VBTYP_V = 'C' to get Sales order and
Specify VBTYP_V = 'J' to get delivery numberr.
Thanks,
Vinay
‎2007 Jan 25 7:48 PM
Hi,
1) Link to Sales document.
VBRP-AUBEL = VBAP-VBELN.
VBRP-AUPOS = VBAP-POSNR.
2) Link to Delivery document.
VBRP-VGBEL = LIPS-VBELN.
VBRP-VGPOS = LIPS-POSNR.
3) Link to accounting document.
VBRK-VBELN = BKPF-AWKEY & BKPF-AWTYP = 'VBRK'
Thanks,
Naren
‎2007 Jan 25 7:59 PM
Check this link for SD Tables and their relationships:
http://www.erpgenie.com/abap/tables_sd.htm
Thanks,
Santosh