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: 

Suggestions about a query to get BELNR field to consulting BSEG.

Former Member
0 Kudos

Hi dear forum

I want to go to BSEG table, with data from MSEG and MBEW tables, actually after consulting this to tables i go to BKPF table to get BELNR field and then go to BSEG table with this BELNR field. The problem is that i don´t have all the primary fields of BKPF and i have a serious performance problem.

Some body has an idea to get more easy BELNR field and consulting with this field in BSEG... the problem.. is in the consulting in BKPF.

Thnks

Josue Cruz

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can start from BKPF..

Ex..

SELECT * FROM BKPF INTO TABLE T_BKPF

WHERE AWTYP = 'MKPF'

AND AWKEY = 'Material document number + Year'.

" MKPF-MBLNR+MKPF-MJAHR.

Concatenate the values of MKPF-MBLNR and MKPF-MJAHR and use it in AWKEY

The field AWKEY & AWTYP has index in the table BKPF..so there will be no performance issues..

Thanks

Naren

1 REPLY 1

Former Member
0 Kudos

Hi,

You can start from BKPF..

Ex..

SELECT * FROM BKPF INTO TABLE T_BKPF

WHERE AWTYP = 'MKPF'

AND AWKEY = 'Material document number + Year'.

" MKPF-MBLNR+MKPF-MJAHR.

Concatenate the values of MKPF-MBLNR and MKPF-MJAHR and use it in AWKEY

The field AWKEY & AWTYP has index in the table BKPF..so there will be no performance issues..

Thanks

Naren