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

Editing a file in the Presentation Server.

Former Member
0 Likes
681

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
636

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...

5 REPLIES 5
Read only

Former Member
0 Likes
636

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.

Read only

Former Member
0 Likes
636

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

Read only

Former Member
0 Likes
637

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...

Read only

0 Likes
636

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

Read only

Former Member
0 Likes
636

Thanks people!!

The way is use the Application Server.