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

problem with MSEG table

Former Member
0 Likes
848

Hai

I have used this query

if it_mseg_fi[] is not initial .

select lifnr matnr menge charg werks

from mseg

into table it_lifnr

for all entries in it_mseg_fi

where matnr = it_mseg_fi-matnr

and charg = it_mseg_fi-charg

and werks = it_mseg_fi-werks.

endif.

it will take more time to execute in production . How to solve this performance issue .

5 REPLIES 5
Read only

kiran_k8
Active Contributor
0 Likes
713

Veda,

If the internal table it_mseg_fi[] is having MBLNR and MJAHR include these two fields in the where clause of the select query.Without giving Materila Document Year if you try to access MSEG table obviously it will take time.None of the fields(matnr,charg,werks) in the where clause of the select statement are primary keys.

K.Kiran.

Read only

Former Member
0 Likes
713

hi ,

try out the index .

it will help to increase the performance .....

but do consult your basis consultant before transpoting the ndex to PRD...

Thnks

Sahil

Read only

Former Member
0 Likes
713

hi

pl type

if not it_mseg [] is initial

insted of

if it_mseg_fi[] is not initial .

regards

sree

Edited by: sreehari polisetti on Sep 13, 2008 7:11 AM

Edited by: sreehari polisetti on Sep 13, 2008 7:12 AM

Read only

Former Member
0 Likes
713

Hi ... you can create an index in SE11 with fields mandt, matnr, charg and werks ... with this step the select will be better

Read only

Former Member
0 Likes
713

Dear

Mseg is material segment table so you should use it with inner joint with MKPF table .

and select perticular movement for selecting data.

an also remeber there are some auto entry of production so put xauto = ' ' in select querry.

i think this is work for you.

regards

Nayan Lad