Application Development 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: 

Is this a performence issue?

Former Member
0 Kudos

Hi,

I have to join 4 tables with the single key.

Can i write my select querry like this.........

SELECT amatnr algort awerks aspmon amagbb awagbb aazubb aaagbb

bmaktx cekgrp dmbwbest dwbwbest

INTO CORRESPONDING FIELDS OF TABLE itab

FROM ( ( ( s031 AS a

INNER JOIN makt AS b ON bmatnr = amatnr )

INNER JOIN marc AS c ON cmatnr = bmatnr )

INNER JOIN s032 AS d ON dwerks = cwerks ) WHERE a~matnr IN s_matnr.

Thanks in advance,

Regards,

kk.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Remove into corresponding fields addition in select statement...no problem with your code you can use ..

2 REPLIES 2

Former Member
0 Kudos

Remove into corresponding fields addition in select statement...no problem with your code you can use ..

former_member194613
Active Contributor
0 Kudos

you must decide whether it is a performance issue, run it, measure runtime (even counting is a measurement), if it is o.k., then it is no issue.

Depending on table sizes, I guess it will be an issue.

The 'into-corresponding' is peanuts, it is completely o.k.

The indexes are an issue.


FROM ( ( ( s031 AS a
INNER JOIN makt AS b ON b~matnr = a~matnr )
INNER JOIN marc AS c ON c~matnr = b~matnr )
INNER JOIN s032 AS d ON d~werks = c~werks ) WHERE a~matnr IN s_matnr.

makt has the language in the key, I guess you could specify it.

Maybe you also know the werks?

Make sure that the index with 'matnr' exists for s031, not only in the dictonary but on the database,

check SE11 and 'Indexes'.

I assume that it is much better to start with S032, then join S031, then MAKT, then MARC, use all

field from the key which are identical in the on-condition.

Siegfried