09-24-2008 8:22 AM
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
09-24-2008 8:27 AM
09-24-2008 8:26 AM
Hi
first of all you check before for all entries whether you have written first intternal table is not initial.
regards
venkat
09-24-2008 8:27 AM
09-24-2008 8:27 AM
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
09-24-2008 8:29 AM
Hi,
The internal table you have used for all entries is initial.
Please check while using the internal table for not initial.
Regards,
Raju.
09-24-2008 8:31 AM
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>