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

Time Out error for select statement

Former Member
0 Likes
540

Hi Folks,

OPEN CURSOR WITH HOLD c1 FOR SELECT ordid ordno FROM /1OM/ORDR7MP3100
             FOR ALL ENTRIES IN gt_po_details
            where ordid = gt_po_details-ordid AND prtid = gt_po_details-prtidto.
DO.


>>>>>>>>>>   FETCH NEXT CURSOR c1 INTO TABLE gt_po4 PACKAGE SIZE 10000.
  

IF SY-SUBRC EQ 0.
     APPEND LINES OF gt_po4 TO gt_po_numbers.
     ELSE.
       EXIT.
    ENDIF.
ENDDO.
   CLOSE CURSOR c1.
ENDIF.

ordid is primary key.i written select statement sequence is same as DB table field sequence.

This select statement is trying to get 200000 records from DB level.

AT fetch statement line its giving time out error.

Please help me to avoid timeout error.

Thanks in advance

2 REPLIES 2
Read only

former_member214709
Participant
0 Likes
359

Dear Srinivas,

You can use the Function Module :

SAPGUI_PROGRESS_INDICATOR

Regards

Dinesh

Read only

volker_borowski2
Active Contributor
0 Likes
359

Humm,

using a package size of 10000 for a FAE with PK WHERE clause seems useless to me.

Did you do an SQL Trace, to verify how many fetches are executed before the timeout and

what the real statement that is executed against the DB looks like?

Volker