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: 

Performance issue in ME2M and ME2N standard reports in production

former_member810660
Participant
0 Kudos

Hi Experts,

I was running these 2 reports ME2M and ME2N in back ground, I Have given all the possibilities of selection criteria, But its taking 25 to 30 minutes of time and displaying only 15 to 20 records. I found a query inside the code. I running over a range of 20,000 records.

SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_ekpo
FROM ekko as k INNER JOIN ekpo as p
ON p~ebeln = k~ebeln
WHERE k~lifnr IN s_lifnr             "EKKO-Data
  AND k~ekorg IN r_ekorg
  AND k~bsart IN s_bsart
  AND k~ekgrp IN s_ekgrp
  AND k~reswk IN s_reswk
  AND k~bedat IN s_bedat
  AND p~matnr IN em_matnr            "EKPO-Data
  AND p~werks IN em_werks
  AND p~bstyp IN r_bstyp
  AND p~wepos IN r_wepos
  AND p~repos IN r_repos
  AND p~loekz IN r_loekz
  AND p~pstyp IN r_pstyp
  AND p~knttp IN s_knttp
  AND p~matkl IN s_matkl
  AND p~ean11 IN s_ean11
  AND p~idnlf IN s_idnlf
  AND p~ltsnr IN s_ltsnr
  AND p~aktnr IN s_aktnr
  AND p~saiso IN s_saiso
  AND p~saisj IN s_saisj
  AND p~ebeln IN s_ebeln.

how can i fix this performance issue. any suggestions.

Thanks & Regards,

Poorna.

3 REPLIES 3

Former Member
0 Kudos

First thing make sure that you are using all the Primary Keys in selection and the selection order in query should be written in sequence with which the key are defined at database level.

I have moved k~ebeln IN s_ebeln at TOP but still you have to resequence the other fields.


SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_ekpo
FROM ekko as k INNER JOIN ekpo as p
ON p~ebeln = k~ebeln
WHERE 
  "k~ebeln IN s_ebeln
  AND k~lifnr IN s_lifnr             "EKKO-Data
  AND k~ekorg IN r_ekorg
  AND k~bsart IN s_bsart
  AND k~ekgrp IN s_ekgrp
  AND k~reswk IN s_reswk
  AND k~bedat IN s_bedat
  AND p~matnr IN em_matnr            "EKPO-Data
  AND p~werks IN em_werks
  AND p~bstyp IN r_bstyp
  AND p~wepos IN r_wepos
  AND p~repos IN r_repos
  AND p~loekz IN r_loekz
  AND p~pstyp IN r_pstyp
  AND p~knttp IN s_knttp
  AND p~matkl IN s_matkl
  AND p~ean11 IN s_ean11
  AND p~idnlf IN s_idnlf
  AND p~ltsnr IN s_ltsnr
  AND p~aktnr IN s_aktnr
  AND p~saiso IN s_saiso
  AND p~saisj IN s_saisj

former_member555112
Active Contributor
0 Kudos

Hi,

Incase it is a standard report; then kindly check for some notes in service market place for the performance issue else raise a message with SAP.

Regards,

Ankur Parab

former_member194613
Active Contributor
0 Kudos

Please run a SQL Trace, check the executed statement, the ABAP coding which you show is no statement it is only a placeholder!

Cechk also the explain and the data for the statement time, executions and records.

Siegfried