2008 May 07 5:44 PM
I created a custom table and the requirement is to load huge data to this table around 20million records. I have input file with 1million records. After loading few files, I got error max extents 300 is reached. We talked to basis and they increased to 1000. Still I'm getting this error.
The way my porgram written was
reading all input data to internal table i_zmstdcost_sum_final.
INSERT zmstdcost_sum FROM TABLE i_zmstdcost_sum_final.
Can any one suggest me the best solution or how to alter my program?
Thanks,
PV
I created a custom table and the requirement is to load huge data to this table around 20million records. I have input file with 1million records. After loading few files, I got error max extents 300 is reached. We talked to basis and they increased to 1000. Still I'm getting this error.
The way my porgram written was
reading all input data to internal table i_zmstdcost_sum_final.
INSERT zmstdcost_sum FROM TABLE i_zmstdcost_sum_final.
Can any one suggest me the best solution or how to alter my program?
Thanks,
PV
2008 May 07 5:56 PM
Did o try running the program in background. In foreground it will not run for so long.
2008 May 07 5:56 PM
Hi
If you need to load a very large number of records u shouldn't load the record in an internal table and use the commit statament after a certain number of record and close a file after loading all its records.
LOOP AT T_FILE.
OPEN DATASET T_FILE.
IF SY-SUBRC = 0.
DO.
READ DATASET T_FILE INTO WA.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
INSERT ZTABLE FROM WA.
IF SY-SUBRC = 0.
COUNT = COUNT + 1.
ENDIF.
IF COUNT = 1000.
COUNT = 0.
COMMIT WORK.
ENDIF.
ENDDO.
IF COUNT > 0.
COMMIT WORK.
COUNT = 0.
ENDIF.
CLOSE DATASET T_FILE.
ENDIF.
ENDLOOP.Max