Skip to Content
0
Mar 30 at 02:05 PM

Unable to call BTP destination from ABAP console program

208 Views Last edit Mar 30 at 02:26 PM 8 rev

Hi all,

we are working in the ABAP cloud environment and have a customer instance. We want to connect to our on-premises SAP ECC system from an ABAP console program. Therefore, we use the method "create_by_cloud_destination". The strange thing is, that it works from the Fiori-UI, but it raises an exception, when we call it from an ABAP console program with the message "Destination service lookup failure HTTP communication error.".

Method if_oo_adt_classrun~main.
Data:
  filter_factory type ref to /iwbep/if_cp_filter_factory,
filter_node type ref to /iwbep/if_cp_filter_node, root_filter_node type ref to /iwbep/if_cp_filter_node. Data: http_client type ref to if_web_http_client, odata_client_proxy type ref to /iwbep/if_cp_client_proxy, read_list_request type ref to /iwbep/if_cp_request_read_list,
read_list_response type ref to /iwbep/if_cp_response_read_lst.
Data(http_destination) = cl_http_destination_provider=>create_by_cloud_destination( i_name = 'SAP_Gateway' ). Endmethod.

Does anybody has a solution on this? Why is it working through the Fiori UI but not in ABAP console?