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

Performance Tuning

Former Member
0 Likes
516

Hi experts,

Performance seems to take to long here in the select statement. Anybody knows a view table to enhance the selection? Thanks.

  • Retrieve data from LTAP

SELECT tanum

matnr

werks

charg

meins

qdatu

vsolm

maktx

lgort

FROM ltap

INTO TABLE i_ltap

FOR ALL ENTRIES IN i_ltak

WHERE tanum EQ i_ltak-tanum

AND matnr IN s_matnr

AND werks IN s_werks

AND qdatu IN r_date

AND lgort IN s_lgort

AND vltyp IN i_lgtyp.

4 REPLIES 4
Read only

Former Member
0 Likes
488

Hi Marc,

Try to add the warehouse number (LGNUM) as this would then cover half of the key fields, which will make the DB to use primary key. Views without this field are not helpful as warehouse number is the most important classification element in WM module. hope this helps.

Regards,

Prabhu

Read only

Former Member
0 Likes
488

Hi,

the first shot woudl be to check if internal table i_ltak is not empty -- since in this case you check only for rest of your condition for which no suitable index exist.

the best then would be create new index or restructure select in order to fit unde indexes of table LTAP

BR, Artem

remeber points

Read only

Former Member
0 Likes
488

This'll be a lot faster:


RANGES: r_lgnum FOR ltap-lgnum.

r_lgnum-option = 'EQ'.
r_lgnum-sign   = 'I'.
SELECT lgnum
  FROM t300
  INTO r_lgnum-low.
  APPEND r_lgnum.
ENDSELECT.

CHECK NOT r_lgnum IS INITIAL.

SELECT tanum matnr werks charg meins qdatu
       vsolm maktx lgort
  from ltap
  into table i_ltap
  for all entries IN i_ltak
  where tanum IN r_lgnum             "<====
    AND tanum EQ i_ltak-tanum
    AND matnr IN s_matnr
    AND werks IN s_werks
    AND qdatu IN r_date
    AND lgort IN s_lgort
    AND vltyp IN i_lgtyp.

Rob

Read only

Former Member
0 Likes
488

Hi Artem Ruzak,

What do you meant by creating new index, how do i do that? Thanks for your inputs.