Application Development and Automation 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: 
Read only

Relation between VBRK and BKPF table

Former Member
0 Likes
17,292

Hi expert

I want to fetch data from BKPF table FOR ALL ENTRIES IN VBRK table. First I have fetched data from VBRK table and using the selected value want to fetch data from BKPF because I want BELNR from this table.

What should be the matching field between two tables, so that I want to fetch data?

Hi expert

I want to fetch data from BKPF table FOR ALL ENTRIES IN VBRK table. First I have fetched data from VBRK table and using the selected value want to fetch data from BKPF because I want BELNR from this table.

What should be the matching field between two tables, so that I want to fetch data?

11 REPLIES 11
Read only

Former Member
0 Likes
7,488

Hi,

Check

VBRK-BELNR = BKPF-XBLNR

Read only

former_member222860
Active Contributor
0 Likes
7,487

Checked

BKPFBELNR = VBRKBELNR

Read only

Former Member
7,487

bkpf-awtyp = 'VBRK'

bkpf-awkey = vbrk-vbeln

bkpf-bukrs = vbrk-bukrs.

Hope this works

Read only

0 Likes
7,487

Thanks, this is the relation that i was looking for

Read only

GauthamV
Active Contributor
0 Likes
7,487

Plz SEARCH in SCN before posting.

Read only

Former Member
0 Likes
7,487

hi,

u can have the data form BKPF thorough fields like AWKEY and AWTYP and VBRK (vbeln).

in bkpf there is a fild called AWTYP in which you have to specify 'VBRK',and you have split AWKEY depending o upon the vbeln .

revert back if you need more assistance.

Edited by: ricx .s on Jun 2, 2009 6:58 AM

Read only

Former Member
0 Likes
7,487

Hi,

VBRK-VBELN = BKPF-XBLNR OR BKPF-AWKEY+0(10)

Read only

Former Member
0 Likes
7,487

Hi

I would suggest you to make use of the following Fields:-

a) BELNR : Accountinc Document Number

b) XBLNR : Refrence document Number.

Hope it helps you.

Regards

Gaurav.

Read only

Former Member
0 Likes
7,487

Hi,

Use vbrk-vbeln to find bkfp.

bkpf-awtyp = 'VBRK'

bkpf-awkey = vbrk-vbeln

go to BSEG with bkpf-keyfields,

Regards,

Mani

Read only

Former Member
0 Likes
7,487

hi

when ever u create a Billing Document (VF01) with reference to a Delivery (VLO1N/VLO2N)

the system creates a Accounting Document automatically at the time of creation of billing document

the billing document header is stored in the table : VBRK

the billing document item is stored in the table : VBRP

the Accounting document header is stored in the table : BKPF

the relation b/w both the tables

VBRK-VBELN = BKPF-XBLNR

BKPF-BELNR is the Accounting Document No

BKPF-XBLNR is the Ref Document no (Billing Document no).

Regards

Read only

Former Member
0 Likes
7,487

Match VBRK-VBELN = BKPF-XBLNR and get the BELNR from BKPF.