Application Development and Automation 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: 
Read only

select query - timeout error

Former Member
0 Likes
912

hi experts,

I have written a pgm where i need to select records from BSAD table. This table has about 10 key fields. But according to my requirement, i can pass only 2 key fields to the table and have to fetch records from this table. But it goes to dump (timout error) in BSAD select query.

So i have used PACKAGE SIZE 20 and tried to fetch only 20 records at a time from the table. But still, it takes lot of time in fetching records from BSAD table.

Pls tell me what is the solution to avoid timeout error and how to fetch the records quickly.

Regards,

Shanthi

1 REPLY 1
Read only

Former Member
0 Likes
357

I hope that your " two fields" are BUKRS and KUNNR.

Consider this: If I can't supply a value for the first field (after mandt), then the second, etc., the select is going to run FOREVER. I think that, if you used ST05 and explained the BSAD open, you would see the problem. I'm guessing that you're not supplying a value for BUKRS, etc., and thereby causing a full table scan. Or you may have supplied NOT operators in the where clause or included an order by statement. Current ABAP CHECK tools (like SLIN or SCID) should point out problems in the where statement also...

May I suggest utilizing SE11 and looking at BS* tables to see if there is an alternative data source where you can supply an EQ value for the first few fields (at least) of the index? Or, post psuedocode so that the forum users can help you out.