on 2024 Aug 09 9:43 PM
Hello team,
I am trying to call the S/4 HANA on premise system from ABAP Environment via Destinations.
GET Call is working as expected.
Below is the code. I am trying to do the post call based on some input parameter
DATA(http_destination) = cl_http_destination_provider=>create_by_cloud_destination(
i_name = CONV #( <fs_sap_systems>-destination_name )
i_authn_mode = if_a4c_cp_service=>service_specific ).
lo_http_client = cl_web_http_client_manager=>create_by_http_destination( http_destination ).
lo_client_proxy = /iwbep/cl_cp_factory_remote=>create_v2_remote_proxy(
is_proxy_model_key = VALUE #( repository_id = 'DEFAULT'
proxy_model_id = 'ZSCM_USER_LOCKED'
proxy_model_version = '0001' )
io_http_client = lo_http_client
iv_relative_service_root = '/sap/opu/odata/sap/ZS_USER_LOCKS_SRV1111/' ).
" Prepare business data
ls_business_data = VALUE #( uname = is_user_locked_st-uname ).
" Navigate to the resource and create a request for the create operation
lo_request = lo_client_proxy->create_resource_for_entity_set( 'USER_LIST_LOCK_SET' )->create_request_for_create( ).
" Set the business data for the created entity
lo_request->set_business_data( ls_business_data ).
lo_response = lo_request->execute( ).
After executing the statement, I encounter a CSRF token failed exception. Is there a need to upload any certificate on the S/4 HANA side?
there are some code to get csrf token and send for post call.
check if you can incorporate the code .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.