cancel
Showing results for 
Search instead for 
Did you mean: 

Would really appreciate some guidance to consume the Datasphere data in ECC successfully.

Yogesh2
Newcomer
0 Kudos
135

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( ).

Accepted Solutions (0)

Answers (1)

Answers (1)

TuncayKaraca
Active Contributor
0 Kudos

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