2009 Jun 15 10:35 AM
hi everybody
im retrieving all the assets in the system in an internal table and convert it to csv format using the fm SAP_CONVERT_TO_CSV_FORMAT, there are abt 50000 records
when executing the program, im getting an error ' Fails to allocate memory' and the prg is stopped
is there a way i can stop that?
2009 Jun 15 10:56 AM
Hi,
as you said 50,000 records.
itab1 contains 50000 records.
itab 2 is intial. ( which contains same strctu of itab1)
pass first 10000 records from itab1 and itab2.
download itab2 records in CSV format.
once download is complted first 10000 records, delete 10000 records from itab 2 as well as itab1.
then pass nest 10000 records from itab1 to itab2.
same thing repeat up to 50 000 records.
hi everybody
im retrieving all the assets in the system in an internal table and convert it to csv format using the fm SAP_CONVERT_TO_CSV_FORMAT, there are abt 50000 records
when executing the program, im getting an error ' Fails to allocate memory' and the prg is stopped
is there a way i can stop that?
2009 Jun 15 10:39 AM
Hi,
Since, you have huge number of records its better to split them up into jobs and convert then to CSV format...
2009 Jun 15 10:50 AM
2009 Jun 15 10:54 AM
hi
you can use this FM for the download as a CVS format.
DATA: m_c_file TYPE string.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = C:\DATA\test.CSV
filetype = 'ASC'
* write_field_separator = 'X'
TABLES
data_tab = itab
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
2009 Jun 15 10:56 AM
Hi,
as you said 50,000 records.
itab1 contains 50000 records.
itab 2 is intial. ( which contains same strctu of itab1)
pass first 10000 records from itab1 and itab2.
download itab2 records in CSV format.
once download is complted first 10000 records, delete 10000 records from itab 2 as well as itab1.
then pass nest 10000 records from itab1 to itab2.
same thing repeat up to 50 000 records.
2009 Jun 15 11:07 AM
rajasekhar
thats what ive been doing
but im still getting that allocation error
2009 Jun 15 11:14 AM
anjali,
use same what i mentioned.
but u have to increase your buffer size, so whatever the data records you are passing on application server after that just free the memory which was allocated to the records.
FREE: ITAB2[].
2009 Jun 15 11:25 AM
2009 Jun 15 11:28 AM
2009 Jun 15 11:29 AM
by using FREE statement we are increasing our buffer size.
after using FREE statement you are facing the same problem, then contact your basis person to increase virtual machine buffer size.
2009 Jun 15 1:19 PM
ive changed the way of doing it
im concatenating all the fields separated by ';' and transfer it to a dataset, then i use the fm GUI_DOWNLOAD to download the file
Will the data be different from the csv file which I would hav used in the fm 'SAP_CONVERT_TO_TEX_FORMAT'?
Can smbody confirm that with me plz?
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |