2008 May 21 6:29 AM
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
2008 May 21 6:34 AM
hi,
check the tables RBKP and RSEG.u can find invoice details.
2008 May 21 6:36 AM
Hi,
VBRK-XBLNR eq VBAP-VBELN
vbrp and vbap for the positions.
Regards
Nicole
2008 May 21 6:37 AM
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.
2008 May 21 6:39 AM
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
2008 May 21 6:40 AM
Hi,
Try ds way:
VBRK-VBELN = VBRP-VBELN
VBRP-AUBEL = VBAP-VBELN
Regards,
Mehul Shah
2008 May 21 6:40 AM
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.
2008 May 21 6:55 AM
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.
2008 May 21 6:48 AM
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
2008 May 21 6:50 AM
Hello,
Check the following fields.
VBRP-AUBEL = VBAP-VBELN.
Regards