2008 Sep 26 8:52 AM
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
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
2008 Sep 26 8:56 AM
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
2008 Sep 26 8:57 AM
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.
2008 Sep 26 8:57 AM
2008 Sep 26 8:57 AM
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.
2008 Sep 26 9:08 AM
2008 Sep 26 9:14 AM
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)
2008 Sep 26 9:33 AM
ohh,
EDIDC and EDID4 are not allowed for join statements because of pool / cluster tables.
I think i have to use for all entries.
2008 Nov 08 4:39 PM
hi
for all entries it should be follows some prerequisites.
so for all entries is better performance than using innerjoins
r
2008 Sep 26 9:30 AM
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