‎2007 May 22 12:03 AM
Hi,
i need to insert 10,00,000 records into one table from one another table.
i have used insert statement like
insert <Database table> from <internal table>.
I want to know it will insert this much record or is there any chance of dump
because of the size of the record.
thanks,
jack
‎2007 May 22 12:06 AM
hi,
u might get dump error for time out. as it takes lot of time...
try to insert in different number of amount.. not as in 1 time.
Regards
SAB
‎2007 May 22 12:12 AM
Thanks for reply.
How can i divide my internal table .?
thanks,
Jack
‎2007 May 22 12:24 AM
10,000.00 does not matter, you can insert as many depends on ur database buffer.
If you use insert command and you may get dump because if you are trying to insert existing record.
so better to use modify command.I will recommend try to run the program in background.
modify dbtable from table int_table.
Thanks
Sesh
Message was edited by:
Seshu Maramreddy
‎2007 May 22 12:29 AM
If you are able to get 1 million records into an internal table without getting a runtime error, then inserting them into the DB table should not be a problem. If you are getting runtime error getting 1 million records into your internal table, you should think about running it in the background. You may also encounter issue with the maximum setting your basis team did for internal table memory.
Try it and you will know.
‎2007 May 22 12:24 AM
Hi,
This may give a dump due to lack of memory owing to huge number of records.
I would suggest you to fetch data from the table in chunks.
Create a loop until there are any more records in the table.
Use UP TO .. ROWS while fetching data from the table into internal table. Then insert these records from internal table into database table.
Code will look like:
DO.
SELECT * INTO ITAB1
UPTO 40000 ROWS
FROM TAB1.
IF SY-SUBRC = 0.
INSERT TAB2 FROM ITAB1.
ELSE.
EXIT.
ENDIF.
ENDDO.
Hope this helps.