‎2008 Nov 20 5:33 AM
Hi,
There is a select statement which is causing performance issue.
SELECT
matnr
charg
sobkz
kunnr
lfgja
lfmon
kulab
FROM msku
INTO TABLE t_msku
FOR ALL ENTRIES IN t_msku_key
WHERE
matnr IN s_matnr
AND werks IN r_werks
AND sobkz IN r_sobkz
AND kunnr = t_msku_key-kunnr
In this select statement matnr is not a mandatory field.Since this is a mandatory field in msku table and this is not passed in the where condition of the select statement it is taking lot of time for execution.
Is it possidle to use range on matnr field instead of select-option field?
If so how do we populate that range?which function module do we use for this?
‎2008 Nov 20 8:54 AM
> Is it possidle to use range on matnr field instead of select-option field?
Select-options is a range. If you leave it empty, your query will run for a long time on a large table, no matter what.
Since you have an EQ-condition on KUNNR, you might want to investigate if there is another table allowing quick access by that field (I'm not aware of one), or if that query is so important and used in several programs, then maybe create a new secondary index on MSKU-KUNNR.
Thomas
‎2008 Dec 05 3:46 PM
Maybe you can also fill MATNR when creating t_msku_key. I don't know how you get that table?
‎2008 Dec 05 6:24 PM
Try, Creating a secondary index on
werks
sobkz
kunnr
This might help in imporving the performance
‎2008 Dec 05 7:36 PM
Hi,
Tell to user that select-options of matnr need to be mandatory, you cant do much more if this important select options is empty.
Regards