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

VBAK Performance

sergio_cifuentes
Participant
0 Likes
758

i got a performance issue with the following select:

SELECT SINGLE vbeln netwr knumv

FROM VBAK

INTO (v_vbeln, v_netwr, v_knumv)

WHERE auart = p_tipo

AND bstnk = pti_zcmtt_envase-ref.

how do i complete a key when i don't have it i mean is there a way to make something to complete the index fields even when you don't know the exactly values, thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
624

Hi,

Perhaps you can create secondary index for table VBAK with MANDT, AUART and BSTNK fields or database view (SE11).

Regards,

Ferry Lianto

5 REPLIES 5
Read only

Former Member
0 Likes
625

Hi,

Perhaps you can create secondary index for table VBAK with MANDT, AUART and BSTNK fields or database view (SE11).

Regards,

Ferry Lianto

Read only

0 Likes
624

but without creating a secondary index, is there a way to complete the index key with a condition that always be true, i mean something like audat GT 19900101??? how this affects my performance is it a good practice or no?

Read only

Former Member
0 Likes
624

Hi,

I believe there is an index on the customer purchase order number BSTNK..

Try this..

SELECT VBELN NETWR KNUMV

UP TO 1 ROWS

FROM VBAK

WHERE bstnk = pti_zcmtt_envase-ref

AND auart = p_tipo

ENDSELECT.

Thanks

Naren

Read only

Former Member
0 Likes
624

Hi,

You can try to add field AUDAT in your select statement since there is secondary index AUD for field AUDAT. It should improve the performance.

Regards,

Ferry Lianto

Read only

0 Likes
624

exactly that's what i want but how do i add the 'audat' field if don't know it?? or i use it in a condition that always be true??