Skip to Content
0
Oct 08, 2009 at 05:38 AM

To optimize expensive select queries ...

64 Views

Hi,

I am optimization for report in sap abap.

Below query for EKPO , EKBE and BKPF is taking much time , i tried but i did not find any alternate subindexes or any other solution . please any body suggest me how optimize it .. Is there any other way to fetch the data or what i can do..

SELECT ebeln ebelp pstyp bednr mtart mwskz FROM ekpo " Addition of bednr mtart mwskz by venkat on 21/9/2009

INTO TABLE t_ekpo

FOR ALL ENTRIES IN t_ekko

WHERE ebeln = t_ekko-ebeln AND

loekz = ' ' AND

pstyp IN r_pstyp.

-


SELECT ebeln ebelp belnr gjahr lfbnr SHKZG menge FROM ekbe

INTO TABLE t_pohis

FOR ALL ENTRIES IN t_mseg

WHERE ebeln = t_mseg-ebeln AND

ebelp = t_mseg-ebelp AND

gjahr = t_mseg-mjahr AND

bewtp = 'Q' AND

lfbnr = t_mseg-lfbnr .

-


SELECT belnr bukrs gjahr awkey blart FROM bkpf

INTO TABLE t_bkpf

WHERE bukrs IN s_bukrs AND

gjahr IN r_year.

Regards

chetan

Moderator message - Please see before posting - post locked

Edited by: Rob Burbank on Oct 8, 2009 9:24 AM