Skip to Content
0
Former Member
Feb 14, 2011 at 01:41 PM

TSV_TNEW_PAGE_ALLOC_FAILED

639 Views

Hi gurus,

I am creating a report for counting and summing data in tables. But when executing a large table (over 15.000.000 records) it dumps with TSV_TNEW_PAGE_ALLOC_FAILED.

I do not know what is wrong because not one of my internal tables is too large. The error points to the fetch statement.

Do I need to clear a memory allocation or do something with the assigned fieldsymbol?

The code is like this:

*       Open cursor for table
        OPEN CURSOR WITH HOLD lv_cursor FOR
        SELECT *
          FROM (lw_table-tabname)
          BYPASSING BUFFER
          WHERE (lt_where).
        DO.
*         Set output table and content
          lw_output-tabname = lw_table-tabname.
          CREATE DATA lw_output-content
                 TYPE STANDARD TABLE OF (lw_output-tabname).

*         Assign content table
          ASSIGN lw_output-content->* TO <lfs_data>.
          IF <lfs_data> IS NOT ASSIGNED. CONTINUE. ENDIF.

          TRY.
*             Get table content per 10000 records
              FETCH NEXT CURSOR lv_cursor
                    INTO CORRESPONDING FIELDS OF TABLE <lfs_data>
                    PACKAGE SIZE 10000.

            CATCH cx_root.                               "#EC CATCH_ALL
*             Close the cursor
              CLOSE CURSOR lv_cursor.
          ENDTRY.

*         Append the output structure to the output table
          APPEND lw_output TO me->gt_output.
          UNASSIGN <lfs_data>.
          CLEAR: lw_output.
        ENDDO.