Skip to Content
0
Jun 18, 2012 at 07:39 AM

Is there any way to optimize the below query...

50 Views

SELECT LIKP~VBELN

LIKP~ERNAM

LIKP~ERDAT

LIKP~BZIRK

LIKP~VSTEL

LIKP~VKORG

LIKP~WADAT

LIKP~LFART

LIKP~KUNNR

LIKP~BLDAT

LIPS~POSNR

LIPS~PSTYV

LIPS~VKBUR

LIPS~MATNR

LIPS~MATKL

LIPS~LGORT

LIPS~MTART

LIPS~CHARG

LIPS~LFIMG

LIPS~VGBEL

LIPS~UECHA

LIPS~VTWEG

LIPS~SPART

LIPS~BWART

INTO TABLE IT_TAB

FROM LIKP INNER JOIN LIPS ON LIKP~VBELN = LIPS~VBELN

WHERE LIPS~VBELN IN S_VBELN

AND LIKP~ERDAT IN S_ERDAT

AND VSTEL IN S_WERKS

AND VKORG IN S_VKORG

AND LFART IN ('LF','LR','NL','ZLF','ZCOD','ZSPB','ZCLR','ZRE1')

AND LIKP~KUNNR IN S_KUNNR

AND BLDAT IN S_BLDAT

AND LIPS~VKBUR IN S_VKBUR

* AND LIPS~BWART NOT IN ('602','656')

AND MATNR IN S_MATNR

AND MATKL IN S_MATKL

AND LGORT IN S_LGORT

AND MTART IN S_MTART

AND CHARG IN S_CHARG

AND VTWEG IN S_VTWEG

AND SPART IN S_SPART.