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: 

In real-time scenarios what do u use instead of Joins?

Former Member
0 Kudos
123

Please let me know if JOINS are not used in real-time scenarios. Is it true that you have to use FOR ALL ENTRIES instead of JOINS in Select statements.

Also, let me know if TABLES statement and NESTED LOOPS not used in real-time scenarios?

6 REPLIES 6

Former Member
0 Kudos
77

Hi,

We will use Both Joins & For all entries. If there are so many tables to combine it is not suggestable to use Joins.

Tables statement can be used. Nested Loops will cause perfoamance problem, so it is better always avoiding Nested Loops.

Regards,

Satish

0 Kudos
77

Hi Satish,

In case of more tables to be joined with FOR ALL ENTRIES then there will be so much complexity that we need to create an Internal Table for every Database table that we are going to use in the program. Finally reading the data and populating in the final internal table is difficult. Can you provide me with an example(priority to SD) where u have used only FOR ALL ENTRIES and where the program includes many tables.

Thanks for a prompt reply. Points will certainly be awarded. Thank you.

Former Member
0 Kudos
77

Hi,

We don't prefer to use Joins and Nested loops.

Instead you can use FOR ALL ENTRIES IN statement.

TABLES keyword used to define the database tables in the report program. you should use this.

Thanks

Bhanu

0 Kudos
77

well actually the FOR ALL ENTRIES statement is as well known to be of bad performance since it forces a full table scan.

0 Kudos
77

hai ,

I am Posting a Piece Of Code.

select matnr

werks

stlnr

from MAST

into table it_mast

where werks eq s_plant.

if not IT_MAST [] IS INITIAL .

select stlnr

idnrk

stlkn from stpo

into table IT_STPO

for all entries in IT_MAST

where stlnr = IT_MAST-STLNR.

ENDIF.

0 Kudos
77

Hi

I dont have problem with using FOR ALL ENTRIES. But this concern comes when we have so many tables to join without using JOINS statement in Select statement. If you have any such report, pls provide it to me. Thank you.