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 gives timedout error

0 Likes
1,215

Hi,

I had a select statement like this:

select * from ausp where attin = '123'. Since this table(ausp) has got some 1500+ entries for a particular attin, this select gave timed out error.

Instead of using select I modified my query as:

OPEN CURSOR g_cursor FOR

SELECT * FROM ausp where attin = '123'.

FETCH NEXT CURSOR g_cursor

APPENDING CORRESPONDING FIELDS OF TABLE lt_participants.

IF SY-SUBRC <> 0.

CLOSE CURSOR g_cursor.

ENDIF.

Even after using cursor, the query gives timedout error.

There are few more key entries in the table, but I dont have those values when i do the select, so I have to select with just one where condition. Is there is any other way I can select the values from this table without giving timedout error.

Thanks for your help.

Regards, Sathish R

Hi,

I had a select statement like this:

select * from ausp where attin = '123'. Since this table(ausp) has got some 1500+ entries for a particular attin, this select gave timed out error.

Instead of using select I modified my query as:

OPEN CURSOR g_cursor FOR

SELECT * FROM ausp where attin = '123'.

FETCH NEXT CURSOR g_cursor

APPENDING CORRESPONDING FIELDS OF TABLE lt_participants.

IF SY-SUBRC <> 0.

CLOSE CURSOR g_cursor.

ENDIF.

Even after using cursor, the query gives timedout error.

There are few more key entries in the table, but I dont have those values when i do the select, so I have to select with just one where condition. Is there is any other way I can select the values from this table without giving timedout error.

Thanks for your help.

Regards, Sathish R

6 REPLIES 6
Read only

Former Member
0 Likes
1,177

Change you select WHERE Condition. It says ATTIN but the field name is ATINN. That is causing the problem.

Read only

0 Likes
1,177

Hi Ashis,

It was a typo. I am using the right field name in my select condition. I am not getting short dump, I am getting timed out error.

Regards, Sathish R

Read only

0 Likes
1,177

Instead of SELECT *, can you just populate required fields? Also can you add some more conditions in WHERE clause like for which Class you want to fetch the characteristics values?

Read only

Former Member
0 Likes
1,177

Because you haven't included KLART in the WHERE.

Rob

Read only

kiran_k8
Active Contributor
0 Likes
1,177

Sathish,

See to that you use only primary key or index fields in the where clause of the select query so that it enhances the performance and thus avoids time out errors.

K.Kiran.

Read only

Former Member
0 Likes
1,177

Before the Select statement use the conversion exit for the field ATINN.

Call Fm ---> CONVERSION_EXIT_ATINN_INPUT

with input -


> '123'

feed the result of this into your Select statement like this

SELECT * FROM AUSP where ATINN = output_of_conversion_exit.

The reason it is timing out is because the field ATINN has a non-standard conversions.

Let me know if that worked.

PS - also use SE16 to see if you are able to get a result for the same Select statement.