‎2006 Sep 04 11:13 AM
Hi everybody.
I'm trying to download a file which is set in a web site via a hyperlink which leads to a dialog for downloading/open that file.
Does any of you know how:
- simulate that process from ABAP for getting the file?
- view the entire source code from a page?
I prefer a response to this second question because in the web site I can already find the documentation stored in the file.
Thanks for your helping, fellows.
‎2006 Sep 04 11:21 AM
you can use HTTP_GET function module or cl_http_client class for this.
Regards
Raja
‎2006 Sep 04 11:21 AM
you can use HTTP_GET function module or cl_http_client class for this.
Regards
Raja
‎2006 Sep 04 11:24 AM
sample code sample using the cl_http_client
call method cl_http_client=>create_by_url
exporting
url = wf_string = "variable holding the url"
importing
client = http_client
exceptions
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
others = 4.
call method http_client->send
exceptions
http_communication_failure = 1
http_invalid_state = 2.
call method http_client->receive
exceptions
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
clear result .
result = http_client->response->get_cdata( ).
refresh result_tab .
split result at cl_abap_char_utilities=>cr_lf into table result_tab .
loop at result_tab into r_str.
write:/ r_str .
endloop .Regards
Raja