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: 

Splitting several joins.

Former Member
0 Kudos

dear all,

i want to increase the performance of a query program that has got around 11 inner joins.

if at all, i split it using select and for all entries, it will have nested loops when populating the data into the final table, which will again reduce performance.

how do i solve this with good performance?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Vishnu,

Please post ur 11 joins query here..

U may use a function module if available.

Regards,

Amit

5 REPLIES 5

Former Member
0 Kudos

Hi Vishnu,

Please post ur 11 joins query here..

U may use a function module if available.

Regards,

Amit

Former Member
0 Kudos

Hi,

To improve performance use For all entries by checking previous internal tables have data or not. If available any standard function modules like(MATERIAL_GET_LIST) use them for better performance.

Former Member
0 Kudos

Hi Priya,

Before you do the changes, please run ST05 and SE30 to check which portion of the program that taking the most time, and target on those area first.

You can actually use inner join to join several tables. However do not join too many tables like say more than 5, which in turn will slow down the performance.

If you use for all entries, please make sure that:

1. your for all entries table is not empty

2. Not duplicate entries

If you have nested loop, please try what SAP suggest as parallel cursor approach as shown in this example:

  • Both tables sorted by key K

I = 1.

LOOP AT ITAB1 INTO WA1.

LOOP AT ITAB2 INTO WA2 FROM I.

IF WA2-K <> WA1-K.

I = SY-TABIX.

EXIT.

ENDIF.

" ...

ENDLOOP.

ENDLOOP.

Regards,

Lim...

Former Member
0 Kudos

hi,

Instead of using joins use Views for 3 tables . it will increase u r performance ..

~linganna

awin_prabhu
Active Contributor
0 Kudos

Try to increse the number of key fields given in the 'Where' clause.