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: 

To get the material document without using VBFA.

Former Member
0 Kudos

I have the following query but this is creating some performance issue since VBFA table is very huge.

SELECT b~mblnr

b~mjahr

INTO TABLE t_vbfa_mkpf

FROM vbfa AS a

INNER JOIN mkpf AS b

ON avbeln = bmblnr

WHERE vbelv EQ '1234'

AND vbtyp_n EQ 'R'

AND vbtyp_v EQ 'T'.

Can somebody suggest an alternate way to get the Material Document Number & Material Document Year.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

One more way is to go directly to MKPF with key XBLNR = '1234' i.e delivery number, maybe restricting with document type and if any possible other conditions.

Am not sure if this is really going to help you.

Kind Regards

Eswar

4 REPLIES 4

Former Member
0 Kudos

Hi

One more way is to go directly to MKPF with key XBLNR = '1234' i.e delivery number, maybe restricting with document type and if any possible other conditions.

Am not sure if this is really going to help you.

Kind Regards

Eswar

0 Kudos

I think that querying MKPF by XBLNR in not a good idea. The table is not indexed on this feild.

The MKPF table has more than 5 million entries.

Former Member
0 Kudos

You might add the fiscal year to the join condition, but other than that, I don't see any problem.

Rob

Former Member
0 Kudos

Hi,

use mkpf-xblnr in below logic

SELECT mblnr

mjahr from mkpf

INTO TABLE t_vbfa_mkpf

where xblnr EQ '1234'.

Regards

amole