Skip to Content
0
Former Member
Jul 28, 2009 at 05:34 AM

How to improve the Performance of the select statement

164 Views

Hi.. All,

I have use one select statement but it takes longer time for Execution ..

SELECT vbak~kunnr

vbak~erdat

vbak~vbeln

vbak~lifsk

vbak~auart

vbak~vgbel

vbak~waerk

vbak~vkbur

vbak~bstdk

vbap~zzcwd

vbap~matnr

vbap~arktx

vbap~posnr

vbap~kwmeng

vbap~vrkme

vbap~netwr

vbap~werks

vbap~prodh

vbap~abgru

vbap~lfrel

vbak~autlf

marc~beskz

marc~dispo

t024d~dsnam

vbap~ps_psp_pnr

vbak~augru

vbak~kurst

INTO

TABLE t_vbak_ncom

FROM vbak

INNER JOIN vbap

ON vbakvbeln EQ vbapvbeln

INNER JOIN jest

ON vbapobjnr EQ jestobjnr

INNER JOIN marc

ON vbapmatnr EQ marcmatnr

AND vbapwerks EQ marcwerks

LEFT OUTER JOIN t024d

ON marcwerks EQ t024dwerks

AND marcdispo EQ t024ddispo

WHERE

vbak~vbeln IN s_vbeln

AND vbak~erdat IN s_erdat

AND ( auart IN r_auart

AND auart IN s_auart )

AND vbak~vkorg EQ p_vkorg

AND vbak~vtweg EQ p_vtweg

AND vbak~spart EQ p_spart

AND vbak~vkgrp IN s_vkgrp

AND vbak~vkbur IN s_vkbur

AND vbak~kunnr IN s_kunnr

AND vbak~bukrs_vf EQ p_bukrs

AND vbap~matnr IN s_matnr

AND vbap~prodh IN s_prodh

AND jest~stat EQ 'I0275'

AND jest~inact EQ ' '.

So, please suggest me how to improve the performance of this select statement..

Regards,

Av