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 Invoice and PO number

Former Member
0 Kudos

Hi,

Can any tell me how to link invoice and Po number. Tables also.

thank you.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi sarath ,,

invoice is in vbrk ---

VBRK-VBELN = VBRP-VBELN.

Now fetch

VBRP-VGBEL ,

VBRP-VGPOS . from VBRP

now

VBRP-VGBEL = LIPS-VBELN .

VBRP-VGPOS = LIPS-POSNR.

LIPS-VGBEL = VBAP-VBELN

LIPS-VGPOS = VBAP-POSNR.

VBAP-VBELN = VBAK-VBELN.

INVOICE TO SALES ..

NOW FROM SALES TO PO

VBAK-VBELN

<b>VBAK-BSTNK</b> -


> THIS IS UR FIELD

<b>VBAK-BSTNK = EKKO-EBELN</b> CROSS CHECK THIS ..

take an invoice number and explore from table VBRK --to VBAK

this is the link..

regards,

Vijay

4 REPLIES 4

Former Member
0 Kudos

check EKBE table .

EKBE-VGABE = 1 FOR GR

EKBE-VGABE = 2 FOR IR.

regards

Prabhu

null

former_member181962
Active Contributor
0 Kudos

SELECT EBELN

EBELP

BELNR

FROM EKBE

WHERE EBELN = EKPO-EBELN

AND EBELP = EKPO-EBELP

AND VGABE = '2'.

ekbe-belnr would be the IR.

Regards,

ravi

Former Member
0 Kudos

Hi ,

Tables for invoice ,

VBRK - invoice header

VBRP - invoice line items.

Customer Purchase order field -VBRK-BSTNK_VF.

Tables for Purchase order,

EKKO - Header table

EKPO - Line items

Regards,

Raghavendra

Former Member
0 Kudos

hi sarath ,,

invoice is in vbrk ---

VBRK-VBELN = VBRP-VBELN.

Now fetch

VBRP-VGBEL ,

VBRP-VGPOS . from VBRP

now

VBRP-VGBEL = LIPS-VBELN .

VBRP-VGPOS = LIPS-POSNR.

LIPS-VGBEL = VBAP-VBELN

LIPS-VGPOS = VBAP-POSNR.

VBAP-VBELN = VBAK-VBELN.

INVOICE TO SALES ..

NOW FROM SALES TO PO

VBAK-VBELN

<b>VBAK-BSTNK</b> -


> THIS IS UR FIELD

<b>VBAK-BSTNK = EKKO-EBELN</b> CROSS CHECK THIS ..

take an invoice number and explore from table VBRK --to VBAK

this is the link..

regards,

Vijay