Und bitte bei solchen Spielchen die URL überprüfen!Tron hat geschrieben:Moin.
ein Beispiel für cl_http_client=>create_by_url findest Du http://www.wp.gate2app.com/?page_id=912 hier.
Report YBC_HTTP_SERVER_TEST
(vielleicht geht aber auch schon Ping.exe von deinem Rechner.)
lg Jens
 Code: Alles auswählen.
data:  client      type ref to if_http_client,
         url       type string,
         returncode TYPE sy-subrc.
url = 'http://www.google.com'.
****Create the HTTP client
  call method cl_http_client=>create_by_url
    exporting
      url    = url
*      ssl_id = page_srv-ssl_id                         for https
    importing
      client = client
    exceptions
      others = 1.
sy-subrc = returncode.
****Make the call
  client->send( ).
****Receive the Response Object
  call method client->receive
    exceptions
      http_communication_failure = 1
      http_invalid_state         = 2
      http_processing_failed     = 3
      others                     = 4.
write:/ returncode,
        sy-subrc.

Code: Alles auswählen.
  
DATA    errortext TYPE string.
DATA   subrc TYPE i.
if sy-subrc <> 0.
    call method client->get_last_error
      importing
        code    = subrc
        message = errortext.
    endif.