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: 

link between VBRK & VBAK

Former Member
0 Kudos
2,909

HI

I want to retrieve invoice details of particular sales document number. But there is no relationship between these two tables. But there is relationship between VBRP & VBAK. But if iam linking these two then line item also displaying. But i dont want any line item. how can i get the billing details based on sales document number

9 REPLIES 9

GauthamV
Active Contributor
0 Kudos
384

hi,

check the tables RBKP and RSEG.u can find invoice details.

Former Member
0 Kudos
384

Hi,

VBRK-XBLNR eq VBAP-VBELN

vbrp and vbap for the positions.

Regards

Nicole

former_member181995
Active Contributor
0 Kudos
384

Dear Hima,

For this purpose use VBFA table and field is VBELV and VBELN.now you can join with these field to vbak and abrk.

Amit.

Former Member
0 Kudos
384

Hi,

Vbeln is the only relation for vbak and vbrp

there is a relation between vbap and mara bu suing matnr

and there is a realtion between mara and rseg using matnr

and there is relation between rbkp and rseg using belnr and gjahr.

By using these detils you can fetch the invoice details.

I think it is helpful for you.

Reward if useful.

Thanks and regards

Deepika

Former Member
0 Kudos
384

Hi,

Try ds way:

VBRK-VBELN = VBRP-VBELN

VBRP-AUBEL = VBAP-VBELN

Regards,

Mehul Shah

Former Member
0 Kudos
384

Hi Hima,

See below , u may get idea.

Invoice to Sales order Link

(VBRP-AUBEL = VBAP-VBELN, VBRP-AUPOS = VBAP-POSNR).

Invoice to Delivery Link

(VBRP-VGBEL = LIPS-VBELN, VBRP-VBPOS = LIPS-POSNR)

First you should link with item tables and get required header data of VBRK.

Regards,

Vishvesh

if helpful, rewards it.

0 Kudos
384

Hi

I have written join condition for getting the invoice details of a particular sales document number

SELECT VBRP~AUBEL

VBRK~VBELN

VBRK~FKDAT

VBRK~NETWR

VBRK~WAERK

VBAK~BSTNK

VBAK~BSTDK

INTO TABLE IT_VBRP

FROM ( VBRK INNER JOIN VBRP

on VBRKVBELN = VBRPVBELN )

INNER JOIN VBAK

ON VBRPAUBEL = VBAKVBELN.

but here what is happening is im getting the line item also. how to avoid that.

Former Member
0 Kudos
384

Hi,

One to One link beween bill no and sale order is not available

vbrp-aubel and vbak-vbeln can be linked

sort and delete adjacent duplicates comparing vbak-vbeln..,

if u want sales order header wise data.

Regards,

Mukundan

Former Member
0 Kudos
384

Hello,

Check the following fields.

VBRP-AUBEL = VBAP-VBELN.

Regards