Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Data Interfaces and Communication Interfaces →  ICF - Internet Communication Framework →  ICF Examples 

Calling an HTTP Service Using the POST Method

This example demonstrates calls of an HTTP service in ICF and a Web browser. The input data is passed using the POST method.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    IF icf_node IS INITIAL.

    DATA(url) = icf_node &&
                `?sap-client=` && sy-mandt &&
                  && cl_i18n_languages=>sap1_to_sap2( sy-langu ).

      |<html>| &&
      |<body>| &&
      |Link to HTTP-Service:

| &&
      |<a href="{ url }" target="_blank">{ url }</a>| &&
      |</body>| &&
      |</html>| ).


This example has the same structure as the example Calling an HTTP Service. In this case, the method IF_HTTP_EXTENSION~HANDLE_REQUEST of the class CL_HTTP_EXT_SERVICE_POST_DEMO is used to demonstrate how user input sent by a HTML page form generated by the handler class is sent using the POST method and read using the method GET_CDATA.


The HTTP service must be activated in transaction SICF before the example can work.