on 2024 Feb 08 12:59 PM
We want to consume SAP Datasphere data in ECC and update the ECC Z-table. We are trying to consume it via OData. We have written ABAP code to authenticate by creating the HTTP_CLIENT by RFC Destination. Maintained the RFC destination for external service in ECC. The challenge we are facing is in providing the Username and Password.
As we cannot have user without email in the Datasphere, we are forced to use DB User and password. In the Target host we gave the domain name and Service number. Authentication fails with DB user and pwd as the host required apllication user and password.
Would really appreciate some guidance to consume the Datasphere data in ECC successfully. Below is snippet of code I have written. "lv_url" is link of Datasphere service created on view.
cl_http_client=>create_by_destination(
EXPORTING
destination = 'RFC Name' " Logical destination (specified in function call)
IMPORTING
client = lo_http_client " HTTP Client Abstraction
EXCEPTIONS
argument_not_found = 1
destination_not_found = 2
destination_no_authority = 3
plugin_not_active = 4
internal_error = 5
OTHERS = 6 ).
CREATE OBJECT lo_rest_client
EXPORTING
io_http_client = lo_http_client.
lo_http_client->request->set_version( if_http_request=>co_protocol_version_1_0 ).
IF lo_http_client IS BOUND AND lo_rest_client IS BOUND.
cl_http_utility=>set_request_uri(
EXPORTING
request = lo_http_client->request " HTTP Framework (iHTTP) HTTP Request
uri = lv_url " URI String (in the Form of /path?query-string)
).
lo_http_client->send( ).
lo_http_client->receive( ).
lv_response = lo_http_client->response->get_cdata( ).
Hi @Yogesh2,
I don't think you can / need to access SAP Datasphere via RFC from SAP ECC. There are a few ways to access SAP Datasphere One of them is Consume Data via the OData API and the connection / authentication is through OAuth Client of Datasphere.
Regards,
Tuncay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.