Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

performance over join..

Former Member
0 Likes
804

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
783

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.

5 REPLIES 5
Read only

Former Member
0 Likes
784

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.

Read only

Former Member
0 Likes
783

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

Read only

ThomasZloch
Active Contributor
0 Likes
783

> 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

Read only

Former Member
0 Likes
783

Hi,

Use for all entries rather than join.

Tks,

Krishna...

Read only

0 Likes
783

> Use for all entries rather than join.

How exactly would that help?