Error while making a HTTP request from ABAP REPORT PROGRAM

2 weeks ago 8

I americium trying to marque a station petition to an extrnal URL to fetch the CSRF token details which are further required to marque a get request. I person attached the codification below. The codification is moving good successful the ECC strategy but it is giving the mistake successful S/4 system. Is the mistake related to immoderate strategy configuration?

Error Text:- IcmConnInitClientSSL: Proxy transportation to https://internal.yamaha-dealers.com:443 via proxy:3128 failed

CODE:-

cl_http_client=>create_by_url(
    EXPORTING
      url    = 'https://internal.yamaha-dealers.com/oauth2/endpoint/YMUSProvider/token'
      proxy_host 'proxy'
      proxy_service '3128'
   IMPORTING
     client ro_client
     ).
    ro_client->refresh_request).
    ro_client->request->set_versionif_http_request=>co_protocol_version_1_1 ).
    ro_client->propertytype_logon_popup 0.

    "Set Method
    ro_client->request->set_method( 'POST').

    "Set headers
    ro_client->request->set_header_fieldsit_header_fields ).

    DATA(lo_requestcl_rest_message_builder=>create_http_message_entityro_client->request ).
    lo_request->set_content_typeiv_media_type = 'application/x-www-form-urlencoded' ).
    lo_request->set_string_data( 'grant_type=password&client_id=sap_user&client_secret=$someValue&username=U:externalService:sap_user&password=someValue' ).

    ro_client->request->set_header_fieldname  if_http_header_fields=>accept
                                          value if_rest_media_type=>gc_appl_www_form_url_encoded ).
it_header_fields:-

MuditJain_0-1728970291112.png

Read Entire Article