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

data selecting from mcha poor performance

Former Member
0 Likes
999

Hi experts,

How to improve the performance of below query,

while i have create index on charg(batch number).

SELECT MATNR CHARG FROM mcha
           APPENDING TABLE itab
           WHERE charg IN s_charg .

7 REPLIES 7
Read only

Former Member
0 Likes
911

what is the need of creating index on it? it already is a primary key

Read only

0 Likes
911

ok,

but what should i do????

Read only

0 Likes
911

Hi,

Try to use all the possible primary key fields in the select where condition. The performance would increase considerably.

Regards,

Vikranth

Read only

0 Likes
911

Hi,

the index is used only if the index fields are supplied in the where condition, i.e. the index of MCHA has MATNR WERKS CHARG. If MATNR is not supplied, the index will never be used.

If you really have no other way (I think you can retrieve the material numbers by analyzing certain movement types of material movements in MKPF and MSEG), then you may create an index on MCHA-CHARG. But you should be aware that this may decrease the performance of many logistics modules.

Try to analyze the requirement in business terms.

Regards,

Clemens

Read only

Former Member
0 Likes
911

no response long time

Read only

0 Likes
911

Hi Tomar,

You can go for dynamic selection...with this u can possibly send atleast 2-3 or as many input values and pass it on to select stmt...performance can reduce a little bit....

Regards,

Vamshi

Read only

Former Member
0 Likes
911

hi,

BWTAR is then index field in this table . try to this field in where condition

Jitendra