Hi,
Please help to increase the performance the below select statement :
SELECT ekko~ebeln
ekko~bsart
ekko~aedat
submi
ebelp
matnr
menge
meins
umrez
umren
lmein
FROM ekko INNER JOIN ekpo
ON ekko~ebeln = ekpo~ebeln
APPENDING table i_opekpo
WHERE ekko~ebeln IN r_ebeln
AND ekko~aedat IN r_erdat
AND ekko~reswk IN s_werks " S_WERKS-LOW
AND bsart IN ('ZUB1', 'ZUB3', 'ZUB5')
AND ekpo~loekz = space
AND matkl IN s_matkl.
ENDIF.
IF i_opekpo[] IS NOT INITIAL.
SELECT vbrk~vbeln
vbrk~knumv
vbrk~fkdat
vbrk~erzet
vbrk~kunrg
vbrk~spart
vbrp~posnr
vbrp~vrkme
vbrp~umvkz
vbrp~umvkn
vbrp~meins
vbrp~fkimg
vbrp~fklmg
vbrp~matnr
vbrp~werks
vbrp~aubel
vbrp~aupos
vbrp~autyp
vbrp~vgbel
vbrp~vgpos
vbrp~netwr
vbrp~mwsbp
FROM vbrk
INNER JOIN vbrp
ON vbrk~vbeln = vbrp~vbeln
INNER JOIN j_1iexchdr
ON vbrk~vbeln = j_1iexchdr~rdoc
INTO TABLE it_vbrp
FOR ALL ENTRIES IN i_opekpo
WHERE aubel = i_opekpo-ebeln
* AND aupos = i_opekpo-ebelp
AND vbrk~fksto EQ space
AND vbrk~sfakn EQ space
AND j_1iexchdr~status EQ 'C'. this select is taking more than 10 mins to execute plz help me ...