‎2008 Oct 27 5:43 PM
Hi, people!
I need to edit a file (one line in the middle of the file) and it's in the presentation server. By CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD or GUI_DOWNLOAD I write the file and append lines... but it's impossible for me edit one line in the middle....
Suggestions??
PS:. I need edit it out of the memory or with a small size of memory, because the file is writed step-by-step and its size is sooooooooooo BIG to put it in an internal table again.
‎2008 Oct 27 7:01 PM
When I said soooooooooooooo BIG, it's a file with aprox. 500 MB, 4000000 of lines...... The SAP Memory explodes! Too much information for put in an internal table again. So, I imagine which I must get only the begin of the file and try rewrite it. I don't know...
‎2008 Oct 27 5:49 PM
yes , you can edit or insert but you need to know the where exactly you going to make the change .
read the file in the presentation server using gui_upload , now the rows of the file will be available in the internal table , by index access or loop the itab find the place using search string operation make necessary changes and then rewrite the file using gui_download.
‎2008 Oct 27 5:50 PM
Hi Evaldo,
I don't see a way of you being able to edit one line without reading the entire file into memory. You could hold the data you are writing to the file in a custom table in SAP, and when an edit is required, delete the old table and recreate a new one based on your custom table.
Best of luck.
SL
‎2008 Oct 27 7:01 PM
When I said soooooooooooooo BIG, it's a file with aprox. 500 MB, 4000000 of lines...... The SAP Memory explodes! Too much information for put in an internal table again. So, I imagine which I must get only the begin of the file and try rewrite it. I don't know...
‎2008 Oct 27 7:08 PM
Hi
If the file is so big, u should consider to move it to Application Server.
U could have timeout problem (and memory space of course) because fm working on presentation server can work online only.
Max
‎2008 Oct 28 6:28 PM