cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to connect and replicate custom tables from SAP BTP to SAP Datasphere

kr_pavankumar
Contributor
0 Kudos
1,077

Hi Experts,

Could you please suggest the best approach to connect and replicate the custom tables data from SAP BTP to SAP Datasphere.

  • Details are below: 
    - Multiple custom tables are built on SAP BTP ABAP
    - Integration or which connection type between SAP BTP ABAP and SAP Datasphere is preferred or best
    - What are the supported Data replication Methods (real time or batch)

Use case: Reporting need
SAP BTP ABAP - Custom tables --> SAP Datasphere --> SAP SAC - Reporting

Kindly provide the inputs. Thank you.
--
BR, KRPK

SAP Datasphere SAP BTP ABAP environment 

View Entire Topic
MayankSuyal
Newcomer
0 Kudos

@kr_pavankumar 

To load data from BTP ABAP Tables to Datasphere efficiently, you need to use SQL service.

Follow below steps:

  1. If it is first time data replicating to DSP from BTP, I would recommend having a dedicated package for your developments.

Packages and TR's: It is not straight forward and are not same as S/4 HANA ABAP Developments.

Please check below link for more information on this.

You would need BTP Admin Access as well for initial setup.

BTP - Software Components

ABAP Cloud - Software Components and Relationships

2. Now after package and TR's sorted out.

In BTP, Firstly, Create Wrapper CDS views and mandatory you need to use annotation - "DataIntegration.deltaReplication.intended: true".

Secondly, Release CDS view with C1 Contract(Key User and Cloud).

Refer below link for code snippet:

DataIntegration.deltaReplication.intended | ABAP Keyword Documentation

3. This is one time, create a Service Definition for Wrapper CDs View created in step 2 - Give a Generic name as you will not create it again and again, you will just add Entities inside it for new requirements.

Also use statement - 'provider contracts sql' in your code. Refer Below Link for reference.

Creating a Service Definition and an SQL-Typed Service Binding | SAP Help Portal

4. This is one time, create a Service Binding of Binding type 'SQL – Web API' for Created Service Definition in step 3, Give a Generic name for Service binding.

For option 'Enabled Operations' - check SELECT and REPLICATE.

Release Service Binding with C2 and C1 Contracts.

5. This is one time, Create Communication Scenario fist in Inbound Tab, add Inbound Service S_PRIVILEGED_SQL1. Second in Authorizations tab add Authorization Object S_SQL_VIEW and provide field values as mentioned in below reference link by SAP. Follow this link, should be straight forward.

Hint : Under SQL_SCHEMA = Provide Service Binding Name, SQL_VIEW = Provide * , SQL_VIEWOP = Select on Read and Replicate.

Once done, Click on Publish Locally.

Creating a Communication Scenario with Object Privileges | SAP Help Portal

6. Once Communication Scenario is built, From Developer Perspective it is done, Now from BTP Admin side 3 things needs to be done.

7. First BTP Admin, need to create Communication System and a Communication User.

8. Second, BTP Admin, need to create Communication Arrangement using Communication Scenario, Communication System and Communication User.

Link for reference:

Creating a Communication System and a Communication User | SAP Help Portal

Creating a Communication Arrangement for Exposing the SQL Service | SAP Help Portal

9. Now finally for Datasphere Replication, follow below link, it should be straight forward.

Creating a Replication Flow for SQL Service Exposure | SAP Help Portal

10. Last but not least, please check Prerequisites and Constraints.

Prerequisites and Constraints | SAP Help Portal

Let me know in case you get stuck anywhere. It is bit complex, but after above hint you should be able to figure out.

kr_pavankumar
Contributor
0 Kudos

@MayankSuyal

Thank you for sharing the details. Nice write up. At the moment, I am exploring the links you shared and viable options, Thanks again!