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

To get the material document without using VBFA.

Former Member
0 Likes
700

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
Read only

Former Member
0 Likes
588

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
Read only

Former Member
0 Likes
589

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

Read only

0 Likes
588

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.

Read only

Former Member
0 Likes
588

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

Rob

Read only

Former Member
0 Likes
588

Hi,

use mkpf-xblnr in below logic

SELECT mblnr

mjahr from mkpf

INTO TABLE t_vbfa_mkpf

where xblnr EQ '1234'.

Regards

amole