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: 

For all entries question

former_member384574
Active Participant
0 Kudos

Dear experts,

I'm still in a doubt. I've read that sometimes is better to use FOR ALL ENTRIES and sometimes is better to use INNER JOIN. I have 5 tables. I need to extract information for three of them and I'm not sure how to do this. My question is the following:

1. In spite the fact that the tables contains code_promotion and code_article in the three tables, these fields are not key in the table C and D, so the Inner join will be longer because it will not read the key field.

2. From table B and C I only need to read one field, the fieldname is the same in both table but in my internal table contains a different name, so I think that the for all entries will not work correctly, am I right? Or there's any way of using For all entries for a specific field in the table?

The situation is the following:

Tables: A, B, C, D, E (all of them contain the same field cod_promotion)

1- Select join between table A and E ----> internal table one

2- Select FOR ALL ENTRIES between internal table one and table B.

3- I should read a unique field from tables C and D and add them into each row of line B is exits. How can I do this?

4-  I should join internal table one with internal table 2.

Which will be better? Maybe, it will be better to do an INNER JOIN between the 5 tables althougth in 2 of them the field cod_promotion is not key?

Any other solution?

Thanks in advance for all your support.

Regards,

Rebeca

4 REPLIES 4

Former Member
0 Kudos

hi Rebecca,

If tables has indexes then it is better to use join.

In case there are no indexes then it is better to use FOR ALL ENTRIES.

Also we can avoid duplicates in FOR ALL ENTRIES.

0 Kudos

Dear Abdul,

Thanks for your response.... I do not think the tables contains too many information, but for know...how is the procedure to create index? I've never created them or use them...

Thanks for your support.

Regards.

Rebeca

0 Kudos

Hi rebeca,

Creating Secondary index is relatively easier process.

You can go through following links.

ttp://help.sap.com/saphelp_nw73/helpdata/en/cf/21eb47446011d189700000e8322d00/content.htm

http://www.youtube.com/watch?v=Exfu198nJ0M

Thx

Ravi

Former Member
0 Kudos

Hello Rebeca,

Before creating secondary indices please read my comments.

1. If the table contains already too many indices please avoid again to create index.

2. If DML operation is frequently used then try to avoid

3. Dont create index with too many fields which will give poor performance

4. Dont use multiple columns with bigger length of data type.

5. Please consider rebuilding the index timing which will occupy more CPU consumption.

6. If your table size is bigger try to create index in DB then create DDIC index then transport.

Regards,

Vadamalai A.