‎2008 Nov 24 6:23 AM
me using these three select
this taking hell lot of time.. any ways to improve these..
for all entries taking more then tht.. so please dont suggest tht.
its critial issue help me out..
SELECT BWERKS AVBELN B~MATNR
AFKDAT ASPART AVTWEG AERDAT A~ERZET
BVGBEL BAUBEL
A~FKART "Added by Arun pandey 08/05/2007
BNETWR BFKIMG B~MWSBP
FROM VBRP AS B
JOIN VBRK AS A ON AVBELN = BVBELN INTO TABLE IT_INV
WHERE A~FKART IN S_FKART
AND ( ASPART IN S_SPART AND ASPART <> 'ST' )
AND A~FKDAT IN S_FKDAT
AND ( AVTWEG IN S_VTWEG AND AVTWEG <> 'ST' )
AND A~FKSTO <> 'X'
AND A~KUNAG IN S_CUST
AND B~WERKS = S_WERKS.
SELECT AVBELN BPOSNR BMATNR BVGBEL AKUNNR AERDAT A~ERZET
ALFDAT BLFIMG
FROM LIKP AS A JOIN LIPS AS B ON AVBELN = BVBELN
INTO TABLE IT_DELV
FOR ALL ENTRIES IN IT_INV
WHERE A~VBELN = IT_INV-VGBEL
AND B~MATNR = IT_INV-MATNR.
SELECT AVBELN ABSTNK AAUART AKUNNR
AVKBUR AVKGRP BNAME1 BORT01
FROM VBAK AS A JOIN KNA1 AS B ON AKUNNR = BKUNNR
INTO TABLE IT_ORDER
FOR ALL ENTRIES IN IT_DELVHEAD
WHERE A~VBELN = IT_DELVHEAD-VGBEL.
‎2008 Nov 24 8:52 AM
Hi,
Your first select statement is not used index.I think others are using index.So, check all select statement are using index or not.Your code good other than index problem.
‎2008 Nov 24 8:52 AM
Hi,
Your first select statement is not used index.I think others are using index.So, check all select statement are using index or not.Your code good other than index problem.
‎2008 Nov 24 9:24 AM
Hi,
Check for not initial condition of internal tables before your select statements which use "For all entries in" , else if its initial, its going to pick up the complete table entries.
Shruthi
‎2008 Nov 24 10:06 AM
> AND A~KUNAG IN S_CUST
How selective is S_CUST typically? If only one or few values, try selecting VRKPA by KUNDE etc. and joining VBRK and VBRP.
Thomas
‎2008 Nov 27 6:14 AM
Hi,
Use for all entries rather than join.
Tks,
Krishna...
‎2008 Nov 27 8:26 AM
> Use for all entries rather than join.
How exactly would that help?