2006 Oct 06 9:05 PM
Hi All,
I have a performance issue.
This below is my select statement. And it takes a long time to retrieve the data.
SORT i_mvke BY matnr.
SELECT kunnr werks matnr FROM msku INTO TABLE i_msku
FOR ALL ENTRIES IN i_mvke
WHERE matnr = i_mvke-matnr
AND kunnr IN r_kunnr
AND werks IN s_werks.
is there any way to improve this select.
Thanks in advance.
2006 Oct 06 9:10 PM
Hi,
if you don't need all 'Special stock indicator' make also a select about it. msku-SOBKZ
NL
Hi All,
I have a performance issue.
This below is my select statement. And it takes a long time to retrieve the data.
SORT i_mvke BY matnr.
SELECT kunnr werks matnr FROM msku INTO TABLE i_msku
FOR ALL ENTRIES IN i_mvke
WHERE matnr = i_mvke-matnr
AND kunnr IN r_kunnr
AND werks IN s_werks.
is there any way to improve this select.
Thanks in advance.
2006 Oct 06 9:10 PM
Hi,
if you don't need all 'Special stock indicator' make also a select about it. msku-SOBKZ
NL
2006 Oct 06 9:25 PM
Thanks NL & Rich.
But its still sluggish after including SOBKZ. And i did have a check for MVKE not being empty.
How can i make use of index? How do i know if this table has any?
Thanks again.
2006 Oct 06 9:28 PM
SE11 --> msku --> Index Button.
In my system, no index is defined for this table...
How to use index??? Just include them in your where parameters...
Greetings,
Blag.
2006 Oct 06 9:18 PM
2006 Oct 07 5:14 AM
Hi ,
Hi
For the follwing query You can create the secondary index on the field 'Special Stock Indicator' in SE11 and then use the same in <Where > clause.
if not i_mvke is initial.
SORT i_mvke BY matnr.
SELECT kunnr werks matnr FROM msku INTO TABLE i_msku
FOR ALL ENTRIES IN i_mvke
WHERE matnr = i_mvke-matnr
AND kunnr IN r_kunnr
AND werks IN s_werks.
Regards,
2006 Oct 07 5:23 AM
Hi,
Check whether your internal table i_msku contains only the fields kunnr werks and matnr.Otherwise use as following.
SORT i_mvke BY matnr.
SELECT kunnr werks matnr FROM msku INTO corresponding fields of TABLE i_msku
FOR ALL ENTRIES IN i_mvke
WHERE matnr = i_mvke-matnr
AND kunnr IN r_kunnr
AND werks IN s_werks.
still the performance is not improved,try using index.
otherwise select all the rows from msku at a strech and then delete the unwanted rows thereafer.
Kindly reward points if it helps.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |