cancel
Showing results for 
Search instead for 
Did you mean: 

Read file from presentation server (like GUI_UPLOAD)

former_member206638
Participant
0 Kudos

Hi,

I need to read a txt file from local pc path in CRM WEB UI runtime. The path and the filename are already known, so I don´t need the control provided by thtmlb:fileUpload control, which automatically adds a u2018Browseu2019 button. I need to read this file without any additional controls or buttons.

I tried with RZL_READ_FILE, but doesn´t work with local files, only with application server files.

As you all know, GUI_UPLOAD doesn´t work in WEB UI...I need exactly something like that!

Any help or suggestion wil be appreciated.

Thanks in advance.

Federico.

Accepted Solutions (1)

Accepted Solutions (1)

prasenjit_sharma
Active Contributor
0 Kudos

You can reuse the view AddDoc of component GS_CM.

Regards

Prasenjit

Answers (3)

Answers (3)

former_member206638
Participant
0 Kudos

Thanks to all for your support.

Kind regards,

Federico.

former_member192716
Contributor
0 Kudos

Hi Federico,

When it comes to web browser (web ui) file upload cannot be done as it is done in SAP GUI. There is a mechanism called 'Form-based File Upload in HTML' through which file is uploaded from web browser to the server, at the back end this is what is used. So you have to use a fileUpload tag to upload a file from web browser.

As an alternative solution, you can use Javascript and activexobjects to upload files. I have developed a wiki which explains excel upload using activexobjects and javascript.

http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebUI-UploadingdatafromExcelfiles

Regards,

Arun

former_member206638
Participant
0 Kudos

HI,

Thanks for your time.

That view involves the same control thtmlb:fileUpload. I'm not required (and not supposed) to create any additional buttons on screen, and that html tag creates the 'Browse' button automatically to get the file path and name.

I have the path and name, it will always be the same; I will always read the same file, over and over again.

What I need is the file read routine, how can I isolate that portion of code from the example you provided?

Thanks again.

Federico.

arne_husemann
Explorer
0 Kudos

Hi,

there is no possibily to achieve this via standard functions. As the Web UI runs in the browser it has no access to the local PCs ressources. I would suggest to use the available fileUpload-element. Technically there are two possiblities to get access to file on the local harddisk, Java-Applets and ActiveX. Both approaches suffer from many disadvantages, e.g. security issues.

Regards, Arne