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: 

problem with MSEG table

Former Member
0 Kudos

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

kiran_k8
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

david_carballido
Active Participant
0 Kudos

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

nayanlad
Participant
0 Kudos

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