Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Fields that relate Billing documents

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Check this link for SD Tables and their relationships:

http://www.erpgenie.com/abap/tables_sd.htm

Thanks,

Santosh