Show TOC

Client ArchitectureLocate this document in the navigation structure

  • The ABAP application program creates an object of the class CL_HTTP_CLIENT (1).


    This is done by calling one of the following methods:CL_HTTP_CLIENT=>CREATE, CL_HTTP_CLIENT=>CREATE_BY_DESTINATION or CL_HTTP_CLIENT=>CREATE_BY_URL.

    This object is referred to here as the client control block (similarly to the server control block). The ABAP application program that sends the request calls the method.


    The structure of class CL_HTTP_CLIENT is described under Interface IF_HTTP_CLIENT.


    Note that the activities in points 2, 3, 5, 6, 7, 11, 12 and 13 must also be triggered by the ABAP application program, that is, by calling the appropriate methods. The ABAP application program therefore uses the components of the class CL_HTTP_CLIENT so that it can generate the request data and process the response data.

    • If you want to call the method CL_HTTP_CLIENT=>CREATE, the following information must be available to the method: HOST (Host name), SERVICE (Port), PROXY_HOST (host name of proxy computer), PROXY_SERVICE (port of proxy computer) and SCHEME (Entry whether HTTP or HTTPS is to be used; default value 'SCHEMETYPE_HTTP'). If you communicate using the SSL protocol ( 'SCHEMETYPE_HTTPS'), you can use the parameter SSL_ID to specify appropriate SSL certificates. If you want to use these certificates to log on to an ABAP Application Server, then you can use SAP_USERNAME and SAP_CLIENT to specify the additional information that is required.

    • If you want the method CL_HTTP_CLIENT=>CREATE_BY_DESTINATION to be called, you have to make the corresponding entries in transaction SM59 for the HTTP destination (node HTTP Connections to ABAP System or HTTP Connections to Ext. Server). For details on the settings, see Connection Establishment Using Destination (SM59).


      There is a central configuration environment for making proxy settings in the system. To access it, call transaction SICF and choose Client -> Proxy Settings.

  • The generated client control block is filled by filling the attribute Request with the required request data (2).

  • The request is then sent using the method SEND (3). To do this, the connection is opened and the request is converted to a HTTP data stream (serialized).

  • Task handlers and the Internet Communication Manager are used to send the request to the required HTTP server (4).

  • If the HTTP server requires authentication (for example, if the server is also an SAP System), the client must now log on (5,6,7,8. If the server is also an SAP System, the client logs on via an SAP logon popup. Otherwise, the client logs on via the HTTP standard popup. The query whether the SAP logon popup or the HTTP standard popup should be used is executed within the method RECEIVE (see 6). If you do not want a logon dialog box for the application, you can disable it by specifying the value CO_DISABLED for the attribute IF_HTTP_CLIENT~PROPERTYTYPE_ LOGON_POPUP.


    This authentication is carried out in dialog processes, not in batch processes.

    If the service is not accessible with this URL, and the response includes a redirect, the ICF manager will redirect the request to the new URL. If you do not want the application to respond this way, you can disable it by specifying the value CO_DISABLED for the attribute IF_HTTP_CLIENT~PROPERTYTYPE_REDIRECT.


    If no proxy information has been specified, the ICF manager also evaluates the central proxy settings for the request. If you do not want the application to respond this way, you can disable it by specifying the value CO_DISABLED for the attribute IF_HTTP_CLIENT~ PROPERTYTYPE_APPLY_SPROXY.

  • The HTTP server generates a response and sends it back (9,10). When the method RECEIVE is called, the response data is imported and the attribute RESPONSE for the control block is filled (10).

  • The data is then processed or displayed by accessing the response attribute (11, 12).


    It is also possible to transfer the output to the HTML control. In this case, the response is displayed as it would be in a browser.

  • Once the data has been displayed, the connection is closed using the method CLOSE (13).


    Once the method CLOSE has been executed, you can no longer access the Request and Response objects.


    Once the application has processed your requests and responses, the connection should be closed using the method close in order to avoid increased resource consumption.