Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Huge data upload to custom table

Former Member
0 Likes
830

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

2 REPLIES 2
Read only

amit_khare
Active Contributor
0 Likes
560

Did o try running the program in background. In foreground it will not run for so long.

Read only

Former Member
0 Likes
560

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