‎2009 Feb 23 11:35 AM
I would like to create a very simple report that
1) takes as input the url of a web site
2) open an http connection to the site taking its html
3) print the html as proof of hit
I want to do it the SAP server and not the GUI with fm like call_browser. What I have to do exactly if I want my sap server open an http connection to an external url.
Thanks in advance
Gabriele
‎2009 Feb 23 1:29 PM
i have the same problem too,
i wanna open a connection with an external link to test if the server is correctly configured to go outside
anyone can help?
‎2009 Mar 19 1:38 PM
solved:
wf_string = 'http://www.google.com'.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = wf_string
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( ).