cancel
Showing results for 
Search instead for 
Did you mean: 

Reading file from http link

Former Member
0 Kudos

Hi,

I want to read a file from a http link and convert it to xstring using ABAP Webdynpro how can I achieve the same.

With Regards

Murali

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Murali,

Refer to this link.

http://help.sap.com/saphelp_nw04s/helpdata/en/b3/be7941601b1d09e10000000a155106/frameset.htm

Check out File_download.

Regards,

Bharath.K

Edited by: Bharath Komarapalem on Dec 18, 2008 11:50 AM

former_member113639
Participant
0 Kudos

Hi,

The problem with upload is that it doesn't accept URL as an input parameter. So this doesn't work.

With Regards

Murali

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I think what you want is for ABAP to act as an HTTP Client. This can be done in normal ABAP as well as in Web Dynpro ABAP. The approach is the same. You use the class, CL_HTTP_CLIENT. This class lets ABAP function as the Internet Browser and make HTTP(S) requests to other servers. I've used this class to make such class in the Flickr APIs, Google Charting and in the ESME project. You can find sample examples in these projects.

uday_gubbala2
Active Contributor
0 Kudos

Hi Murali,

I dont get you as to what you mean by reading a file from a HTTP link. If you mean to say that you want to be able to upload a file using WDA then you can make use of the FileUpload ui element available in WDA. The file content will be uploaded and placed into the context attribute that you bind to the data property of the FileUpload UI element. Once the data in the context, you should take care of handling the data. You can find information about the FileUpload element in [here|http://help.sap.com/saphelp_nw70/helpdata/EN/b3/be7941601b1d09e10000000a155106/frameset.htm].

Regards,

Uday

former_member113639
Participant
0 Kudos

Hi,

This is not what I want. Okay let me explain the problem definition. Lets say that we have a http link pointing to a file. I want to be able to get the content of the file located at the URL in the form of an xstring.

With Regards

Murali