


Out->write( web_http_client_error->get_longtext( ) ).ĭATA http_header_fields TYPE if_web_http_request=>name_value_pairs. Out->write( http_dest_provider_error->get_longtext( ) ).ĬATCH cx_web_http_client_error INTO DATA(web_http_client_error). Query_parameters = VALUE #( ( name = 'SalesOrderID' value = '0500010020' ) ).ĬATCH cx_http_dest_provider_error INTO DATA(http_dest_provider_error). I_query_parameters TYPE if_web_http_request=>name_value_pairs OPTIONALĬLASS zact_test_call_action IMPLEMENTATION.ĭATA query_parameters TYPE if_web_http_request=>name_value_pairs.

This method first retrieves the CSRF token which has to be sent in a http header when executing the POST request.ĪBAP Code: CLASS zact_test_call_action DEFINITION The class contains a method execute_action( ) that takes the name of the action and the parameter(s) as a list of name / value pairs. In the following I am showing a sample that performs a POST request using the following URL: '002'&SalesOrderID='0500010020' Coding explained
#STEAMPUNK CHAR REF HOW TO#
I thought about a workaround to overcome this technical restriction and came up with some ABAP sample code that shows how to use a http client based on the interface With an upcoming update we plan to add a support for function imports and actions. This is unfortunately not possible using the remote OData proxy client since in Steampunk you can only create a remote OData proxy client based on a service conumption model which currently does not yet support function imports or actions.Īs a result, code like the following will NOT work in Steampunk: data:Ĭlient_proxy TYPE REF TO /iwbep/if_cp_client_proxy,įunction_resource type ref to /iwbep/if_cp_resource_function.įunction_resource = client_proxy->create_resource_for_function( 'PROMOTE_EMPLOYEE') The problem – No support for functions and actions by the remote OData proxy clientĪ customer asked me how to use the remote OData proxy client in order to call a function import in their on premise SAP ERP from whithin their SAP BTP ABAP Environment.
