2010 Mar 06 2:10 PM
Hi@all,
at the moment we have a report which download many sap data tables into one big file for each table.
example: BSEG have 25 million records, so the file bseg.txt is maybe 20gigabyte large.
Is it possible to split this into 25 files with 1 million records? like "BSEG_001.txt, BSEG_002.txt...."
best regards,
alex
Hi@all,
at the moment we have a report which download many sap data tables into one big file for each table.
example: BSEG have 25 million records, so the file bseg.txt is maybe 20gigabyte large.
Is it possible to split this into 25 files with 1 million records? like "BSEG_001.txt, BSEG_002.txt...."
best regards,
alex
2010 Mar 06 4:24 PM
Hi,
<li>There is one statement called OPEN CURSOR , you can use that .
<li>Try this test program.
Thanks
Venkat.O
REPORT ztest_notepad.
DATA:it_nfal TYPE STANDARD TABLE OF nfal WITH HEADER LINE.
DATA:c1 TYPE cursor.
DATA:flag TYPE c.
DATA:no_of_lines TYPE i VALUE '1000'.
START-OF-SELECTION.
OPEN CURSOR:c1 FOR SELECT * FROM nfal.
DO.
IF flag NE 'X'.
FETCH NEXT CURSOR c1 APPENDING TABLE it_nfal PACKAGE SIZE no_of_lines.
IF sy-subrc <> 0.
CLOSE CURSOR c1.
flag = 'X'.
ENDIF.
ENDIF.
IF flag = 'X'.
EXIT.
ENDIF.
ENDDO.
2010 Mar 06 9:16 PM
The OPEN CURSOR approach will run into difficulties if there are any COMMITs (may be implied) in the code.
Rob
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |