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: 

TimeOut of SELECT Query

Former Member
0 Kudos

Hi Experts

I have a SELECT query where the fields are extracted againt an Internal Table using a FOR ALL ENTRIES clause.

But, this query takes a very long run and finally times out!

What can be done to prevent this time out?

Please suggest...

Thx

Santo

1 ACCEPTED SOLUTION

Former Member
0 Kudos

use select ... endselect statement instead of FOR ALL ENTRIES.

5 REPLIES 5

Former Member
0 Kudos

Hi

first of all you check before for all entries whether you have written first intternal table is not initial.

regards

venkat

Former Member
0 Kudos

use select ... endselect statement instead of FOR ALL ENTRIES.

former_member673464
Active Contributor
0 Kudos

hi,

Try to run the program in the back ground.I hope it is taking more time as the number of entries are more.

Regards,

Veeresh

Former Member
0 Kudos

Hi,

The internal table you have used for all entries is initial.

Please check while using the internal table for not initial.

Regards,

Raju.

Former Member
0 Kudos

Check the following points.

1. Before the Select query using FOR ALL ENTRIES, check that the INTERNAL TABLE you are using IS NOT INITIAL.


IF T_HEADER[] IS NOT INITIAL.
SELECT ABC
FROM XYZ
FOR ALL ENTRIES IN T_HEADER
INTO T_ITEM......
ENDIF.

2. Try to provide all the key fields i the where clause.

3. Avoid SELECT..ENDSELECT

4. Avoid SELECT *, rather SELECT <desired fields>