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: 

ATC error in for all entries in SAP ABAP

former_member643578
Participant
0 Kudos

Hello All,

when I do ATC checks I am getting following issue.

I checked lot of websites I am unable to solve the issue.
Please help me to sort out of this one.
Thanks and Regards,
Vasundhara Lella

7 REPLIES 7

vijay_hariharan
Contributor

It looks like the ATC check expects you to use a Join instead of FOR ALL ENTRIES here. Surprised to see no WHERE conditions for deliveries.. will fetch data for all delivery types for all years, not sure if that is desired. In any case you can possibly check by changing the code OR await further responses for the exact solution..

Regards,
Vijay

Sandra_Rossi
Active Contributor

The ATC message is clear:

SELECT * FROM ALL statement can be joined with SELECT statement at ... line ...

If you search the forum (only the answers less than 5 or 10 years, not the old answers), you will see that a join is to be preferred over FOR ALL ENTRIES.

A join means for example SELECT ... FROM likp INNER JOIN lips ...

former_member643578
Participant
0 Kudos

Here I used only two tables(LIKP, LIPS). If I want to join more than 6 tables for all entries is suggestable to use. In that case which you suggest for all entries or joins. Please let me know.

FredericGirod
Active Contributor
0 Kudos

Make a simple test, put a trace on a FOR ALL ENTRIES. You will see SAP doing by set of data an access to the database. Each time you have an access, you use a time.

So FOR ALL ENTRIES, if you have more than hundred entries, will consume a lot of time.

Then answer is simple, if you don't care about performance, do what ever you want. keep your code in an easy way of reading.

If you need some performance from your report, create a CDS view with all the JOIN you need.

former_member643578
Participant
0 Kudos

Hello frdric.girod ,

Thanks a lot. I will go through your answer.

emanuel_klenner
Active Participant
0 Kudos

I think the ATC check is simply telling you to use a join between LIKP and LIPS, instead of doing a FOR ALL ENTRIES.

Sandra_Rossi
Active Contributor
0 Kudos

I'd like to hear more from people who said "to join more than 6 tables for all entries is suggestable to use". A myth. Any SQL must be tuned. 10 joined tables can be perfectly fine and for all entries might be a mess. As rule-of-thumb, always avoid for all entries, there shouldn't be any "6 tables" rule.