Application Development 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: 

How do I upload only a few lines of a file from the presentation server?

bjrn_granzow
Discoverer
0 Kudos

Hi there guys,

I'd like to upload the contents of a file on my HD (presentation server) to an internal table. I know this can be achieved by using the GUI_UPLOAD function module. But what if I only want to upload a part of the file, not the whole thing? Like the first 100 bytes or 10 lines or something like that. Some files are just way too big to upload them as a whole. I tried using the OPEN DATASET statement, but that seems to work only for files on the application server. If I try to open 'C: emp est.txt' (for example) with OPEN DATASET, I get an error. Do I have to put the filename differently or am I totally wrong with OPEN DATASET? I'm kinda stuck here and I'd appreciate your help.

Cheers,

Björn.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi:

For presentation server, GUI_upload will only work.

When GUI_upload completes it work to convert it into internal table, if can make a copy by putting a counter into another table.

Regards

Shashi

6 REPLIES 6

Former Member
0 Kudos

Hi:

For presentation server, GUI_upload will only work.

When GUI_upload completes it work to convert it into internal table, if can make a copy by putting a counter into another table.

Regards

Shashi

0 Kudos

Hi Shashi,

thanks for your reply. If I understand you correctly, this means I will have to wait for GUI_UPLOAD to upload the whole file and afterwards filter into another table. I don't want to upload the whole thing because it's that big, I'd like to only upload a portion of it in the first place. Can this be done?

Cheers,

Björn.

Former Member
0 Kudos

HI,

Tcode: CG3Z upload the file from the presentation server to application server.

CG3Y download the file from the application server to presentation server.

Regards,

Sravanthi

0 Kudos

Hi Sravanthi,

thanks for your answer. Does this mean that there is no other way than to transfer the file from the presentation server to the application server and then use OPEN DATASET on the application server file? There's no direct way to open it partially on the presentation server?

Cheers,

Björn.

Former Member
0 Kudos

Hi ,

Only partial upload is not possible. If you are uploading using excel or text file then you can keep required data and delete rest ( keep copy of that file before deleting) or after uploading filter from

internal table.

0 Kudos

Hi Narayan,

thanks for your reply. I take it that I would have to transfer the file to the application server first in order to read it partially.

Thank you all,

Björn.