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: 

select - join or for all entries

Former Member
0 Kudos

HI,

what is the better way to get information out of a Table with a join combination of a second table(with same keyfields).

example: Table EDIDC / EDID4, keyfield = docnum.

lt_edidc contains a lot of IDoc numbers and I need the IDoc Data for all entries in lt_edidc.

should i use:

select ... from lt_edid4 ... for all entries in lt_edidc

or

select with join lt_edidc and lt_edid4 ?

Thanks,

Gordon

9 REPLIES 9

Former Member
0 Kudos

HI,

Use a join better performance and also using for all entires can lead to problems if the internal table is empty and is not caught before executing the select statement.

Regards

Carl

Former Member
0 Kudos

Hi,

Its depends on situation whcih is better performancewise.

If you have matching keyfields in both of the table you can go for JOIN if the records are not huge in that tables.

but if the data is huge better use For all entries in itab.In this case you should have matching fields in both the tables.

When you are using all entries make sure that there are no duplicates records in that internal tables and you have used the condition for second select

if itab1 is not initial.

endif.

Former Member
0 Kudos

Performance wise " for all entries."

Rhea.

Former Member
0 Kudos

Hi,

For all entries is better than joining.

You can just compare the performance in 'Tips & Tricks' of SE30.

Better idea, write in both the ways and check it out.

Regards,

R.Nagarajan.

former_member212653
Active Contributor
0 Kudos

I think FOR ALL ENTRIES is better in this case.

JozsefSzikszai
Active Contributor
0 Kudos

I would go for the JOIN... JOIN conditions will be based on key fields, so this should be ok.

(everyone who is telling that FOR ALL ENTRIES is better performance wise, are simply wrong)

0 Kudos

ohh,

EDIDC and EDID4 are not allowed for join statements because of pool / cluster tables.

I think i have to use for all entries.

0 Kudos

hi

for all entries it should be follows some prerequisites.

so for all entries is better performance than using innerjoins

r

ThomasZloch
Active Contributor

Hi folks, EDID4 is a cluster table, so a join does not work here. One of the very few cases where "for all entries" is the way to go.

Cheers

Thomas