Reputation: 101
I want to extract a database to an internal table, using SELECT and then save the extraction locally, using GUI_DOWNLOAD. However, each file can only have 1 million entries and the extraction comes out with more entries than that.
What is the best way to split the internal table into small tables that contain maximum of 1 million entries. Or to save 1 million entries at a time.
Upvotes: 2
Views: 2120
Reputation: 10524
Well, you can use the PACKAGE SIZE
addition to split it already on the database level.
For example
REPORT ZZZ.
DATA: gt_baldat TYPE STANDARD TABLE OF baldat WITH EMPTY KEY.
CONSTANTS: gc_max_package_size TYPE i VALUE 1000000.
START-OF-SELECTION.
SELECT * FROM baldat
CLIENT SPECIFIED
PACKAGE SIZE gc_max_package_size
INTO TABLE gt_baldat.
* call GUI_DOWNLOAD
WRITE / lines( gt_baldat ).
ENDSELECT.
Upvotes: 3