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
1,128

hi,

I am fetching data from MSEG table but it takes more time to retrive data..... I have tried with secondary indexes also..

but the performance of the program has not improved...

I am selecting with non-keyfields only ....

IF NOT i_mara[] IS INITIAL.

SELECT mblnr

mjahr

zeile

bwart

matnr

werks

shkzg

dmbtr

menge

FROM mseg

INTO TABLE i_mseg

FOR ALL ENTRIES IN i_mara

WHERE matnr EQ i_mara-matnr

AND werks EQ p_werks

AND lgort IN r_lgort

AND bwart IN r_bwart.

IF sy-subrc NE 0.

  • Sy-subrc check not required

STOP.

ENDIF.

ENDIF.

this is my select statment with this only i have to select i have not other option this is my requirement.....

can any one guide me to improve my pgm performenace.. i have tried with all possible tables.....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,039

Hi,

Please check out if the order of the fields in where condition is same as that of the order of secondary index. If possible run the report in background.

Regards,

Santosh

9 REPLIES 9
Read only

Former Member
0 Likes
1,040

Hi,

Please check out if the order of the fields in where condition is same as that of the order of secondary index. If possible run the report in background.

Regards,

Santosh

Read only

Former Member
0 Likes
1,039

hi,

The order of fields are correct, it is working in background

it takes more than 0ne hour to execute client dont want this performance......

Read only

Former Member
0 Likes
1,039

Hi,

Try to use MBLNR and MJAHR in your select statement, then only you can improve the performance of the report. Even if you use secondary index also you will not achive the performance.

Thanks,

Sriram Ponna.

Read only

0 Likes
1,039

hi,

My requirements is as such i donot have any options I have to go with this where clause only

Regards,

priya

Read only

Former Member
0 Likes
1,039

This may not be achieved whatever options is used

Read only

0 Likes
1,039

Hi,

Am getting the same problem with MSEG table (Performance issue). Can you please tell me how to solve the. Code will be helpful.

Regards,

Vijay.

Read only

asik_shameem
Active Contributor
0 Likes
1,039

Hi,

Create a RANGE for the key fields and use them in SELECT query. It will help.

DATA: r_mblnr TYPE RANGE OF mseg-mblnr,
 r_mjahr TYPE RANGE OF mseg-mjahr,
 r_zeile TYPE RANGE OF mseg-zeile.

SELECT 
mblnr
mjahr
zeile
bwart
matnr
werks
shkzg
dmbtr
menge
FROM mseg
INTO TABLE i_mseg
FOR ALL ENTRIES IN i_mara
WHERE matnr EQ i_mara-matnr

AND mblnr IN r_mblnr
AND mjahr IN r_mjahr
AND zeile IN r_zeile

AND werks EQ p_werks
AND lgort IN r_lgort
AND bwart IN r_bwart.

Read only

Former Member
0 Likes
1,039

Dear Banu

I also tired with the same problem, if you got the solution please update me to my business card id

Thanks in Advance

Read only

Former Member
0 Likes
1,039

nelsonDOTrodrigoATloadstarlkDOTcom