09-29-2008 11:05 AM
Hi Experts,
I have database more than 3,000,000 records. I want to download data to server. If I select data into internal table
the program will be terminate "No storage space".
How I can separated process.
thanks.
09-29-2008 11:53 AM
Hi,
Use a cursor to read sections of the table at a time and then download the data in packets to the file.
Such as...
DATA: cur TYPE cursor.
OPEN CURSOR vur FOR
SELECT *
FROM spfli
ORDER BY carrid.
DO.
FETCH NEXT CURSOR cur
INTO TABLE spfli_tab PACKAGE SIZE 100.
IF sy-subrc <> 0.
EXIT.
else.
* Download to the server......
ENDIF.
ENDDO.
CLOSE CURSOR: cur.
Regards,
Darren
09-29-2008 12:47 PM
Hi, Guru
Thank You for reply but I use
OPEN CURSOR cursr FOR SELECT * FROM ZTABLE.
DO.
FETCH NEXT CURSOR cursr INTO wa_ztable.
IF sy-subrc <> 0. CLOSE CURSOR cursr. EXIT. ENDIF.
APPEND wa_ztable TO ITAB.
ADD 1 TO records.
IF records EQ 100000.
CALL FUNCTION 'Z_SPLIT' STARTING NEW TASK
.....
......
CLEAR records.
ENDIF.
ENDDO.
The Process has work only first task next task has error
"DBIF_RSQL_INVALID_CURSOR"
Thanks,