Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Timeout error while fetching records from CE1EGOC table

Hello All,

I am getting a time out dump when I am trying to fetch records from CE1EGOC table in a custom report between some material range. I checked in SE16N for the total number of records and it has 3 lakhs approximately. I tried to use index also but that doesn't help. And I also tried to use concept of Fetch Cursor but that also failed.

      DATA: lvc_cursor TYPE cursor.

      LOOP AT gt_mat INTO gs_mat_temp.

        OPEN CURSOR lvc_cursor

          FOR SELECT paledger

                     vrgar

                     versi

                     perio

                     paobjnr

                     pasubnr

                     belnr

                     posnr

                     gjahr

                     artnr

                     werks

                     absmg_me

                     absmg

                             FROM ce1egoc

                             BYPASSING BUFFER

                             WHERE paledger EQ gv_paledger1

                               AND vrgar EQ gv_vrgar "record type 'F'

                               AND perio LE gv_perio

                               AND gjahr EQ pa_year

                               AND artnr EQ gs_mat_temp-matnr

                             %_HINTS ORACLE 'INDEX("CE1EGOC""CE1EGOC~5")'.

          WHILE lvc_cursor IS NOT INITIAL.

          FETCH NEXT CURSOR lvc_cursor INTO TABLE lt_ce1egoc_cur PACKAGE SIZE 20000.

          DESCRIBE TABLE lt_ce1egoc_cur LINES lv_lines.

          IF sy-subrc EQ 0.

            ADD lv_lines TO lv_tot_lines.

            APPEND LINES OF lt_ce1egoc_cur TO lt_ce1egoc.

          ELSE.

            CLOSE CURSOR lvc_cursor.

          ENDIF.

        ENDWHILE.

      ENDLOOP.

Could you please help to fix this issue.

Thanks and Regards,

Rohit

Former Member
Not what you were looking for? View more on this topic or Ask a question