Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Taesuk
Product and Topic Expert
Product and Topic Expert
658

Background

One of my colleagues introduce a new Smart Data Access (SDA) ABAP adapter wTaking Data Federation to the Next Level: Accessing Remote ABAP CDS View Entities in SAP HANA Cloud”. The adapter is available from QRC 01/2024 onwards. The blog explained the following steps in detail using SQL statements.

  • Creating a remote source to an ABAP system based on SAP ABAP Platform 2108 or later with CDS views bound to SQL Services.
  • Virtualizing a remote CDS view entities as virtual tables for federated queries.

To simplify the use of CDS views, the Data Replication application found in HANA Cloud Central is extended to support creating scheduled snapshots from such ABAP systems including S/4HANA. The Data Replication application in SAP HANA Cloud Central is the successor for Replication Service application available in SAP HANA Cockpit for SAP HANA Cloud which is no longer maintained.

The Data Replication now extends the source system to include S/4HANA on-prem, S/4HANA Cloud Private Edition by selecting SAP S/4HANA as source. Additionally, S/4HANA Cloud Public Edition or SAP BTP ABAP environment by selecting SAP S/4HANA Public Edition as source.

Taesuk_0-1730096027133.png

 

Taesuk_1-1730096027135.png

 

The two additional sources are nearly identical for setting the remote source except that SAP S/4HANA requires some additional information such as the cloud connector setup configurations and the client id. For SAP S/4HANA Cloud, it doesn’t require those additional information. The details of how to setup SQL Services and bind a CDS view entity can be referenced in the “Accessing ABAP-Managed Data Using SQL Services for Data Integration Scenarios” section.

How to configure the snapshot

Once the type of remote source is selected either as S/4HANA or S/4HANA Cloud, the connection properties needs to be entered to establish a connection to the remote source and get its metadata information.

 

Taesuk_2-1730096027139.png

 

 

The Service Path normally is fixed to “/sap/bc/sql/sql1/sap/s_privileged” but can be extended by ABAP team for future expansions.

Keep the default settings for Type Map = semantic and Uid Type = alias.

Setup Cloud Connector when trying to connect to S/4HANA on-prem or S/4HANA Private Edition that are behind firewalls.

As the connection is created successfully, Data Replication will get the list of CDS view entities. Select the entity to create a data snapshot in the SAP HANA Cloud environment as shown below.

Taesuk_3-1730096027161.png

After selecting the object, click confirm to start creating the snapshot(s). It will start loading all data of the CDS view to the replica table and the status will be shown as “Loading”.

Taesuk_4-1730096027162.png

As the data is all loaded, the status will change to “Completed” with Replication Schedule as “Manual Refresh”. The data can be manually refreshed again by clicking the circular arrow icon next to the Replication Schedule dropdown selection. Keep in mind that the exisiting data will truncated and the latest data loaded for each refresh.

Taesuk_5-1730096027168.png

If the snapshot(s) needs to be updated on a regular basis, select the object(s) and click “Set Replication Schedule” in the top right. The snapshot frequency can be setup as daily, weekly or monthly.

Taesuk_6-1730096027182.png

 

Conclusion

We have covered how to do the following in the Data Replication application available in SAP HANA Cloud Central

  • Create a data snapshot from CDS views 
  • Configure a schedule to periodically take snapshots

Combined with the snapshot data from CDS views and using the latest features available in SAP HANA Cloud for Intelligent Data Applications

The snapshot can use any CDS views that is binded to SQL Services. For real-time replication scenario, the Data Replication application plans to support it once it become available in the ABAP adapter layer. For SAP Datasphere scenarios, please refer to Creating replication flow for SQL Service exposure

 

7 Comments
Cocquerel
Active Contributor
0 Kudos

Hi @Taesuk 
You said "For real-time replication scenario, the Data Replication application plans to support it once it become available in the ABAP adapter layer.". Is it not already the case thanks to the annotation 
DataIntegration.deltaReplication.intended

Additional question; before the ABAP ODBC driver came, there was already an ABAP CDS delta replication mechanism based on some Analytics CDS annotations like Analytics.dataExtraction.delta.changeDataCapture.automatic  . Why there are 2 ABAP CDS delta replication mechanisms ? What are the differences ?

Taesuk
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @Cocquerel 

The annotation  DataIntegration.deltaReplication.intended  you've mentioned allows delta replication from CDS entities (replacement of DDIC) with SQL Service which is supported with replication flow in SAP Datasphere. The feature is not yet utilized with ABAP Adapter (SDA) currently and currently in the backlog.

The Analytics.dataExtraction.delta.changeDataCapture is extraction handled by ODP to be consumed with BW or OData. The details can be found in Working with ODP Context - CDS view based extraction,  CDS based data extraction - Part I Overview and CDS based data extraction - Part II Delta Handling 

 

Cocquerel
Active Contributor
0 Kudos

My understanding was that CDS delta replication using Analytics.dataExtraction.delta.* annotations was handled by ODP only if delta is identified via a "last Changed" column that should be part of the CDS. But there is an alternative to identify the delta using database trigger and this alternative is not handled by ODP framework but by RDB framework (Resilient Data Buffer). Am I correct ?
Does the new CDS delta replication from on SQL Service using annotation DataIntegration.deltaReplication.intended is also based on database triggers ? If yes, what's the advantage comparing to the RDB one ?

ShaikAzmathulla
Active Participant

Hi ,

The new Smart Data Access (SDA) ABAP adapter for SAP HANA Cloud, available from QRC 01/2024, allows access to remote ABAP CDS views as virtual tables. The updated Data Replication application in HANA Cloud Central simplifies creating scheduled snapshots from S/4HANA systems.

You can connect to these systems, select CDS view entities, and set replication schedules for regular updates. Future plans include supporting real-time replication for even better data integration. For more details, check the blog’s resources.

Regards, 

Taesuk
Product and Topic Expert
Product and Topic Expert
0 Kudos

@Cocquerel Sorry, I'm not familiar with  RDB framework (Resilient Data Buffer) to answer for your first question. Please check the documentation for DataIntegration.deltaReplication.intended

Cocquerel
Active Contributor
0 Kudos

I did not find in the documentation for DataIntegration.deltaReplication.intended  if the solution is based on database triggers but I guess it is the case ( and so similar to RDB framework ). So, I'm still wondering what's the difference and why there are 2 different CDS annotations using 2 different framework for the same capability (CDS delta replication)

Taesuk
Product and Topic Expert
Product and Topic Expert
0 Kudos

@Cocquerel The main difference is that RDB framework (Resilient Data Buffer) is based on Analytics annotation for Analytic CDS views. The target consumption is BW or DSP. 

While SQL Services based delta replication is for CDS view entity with limitations as below and target is integrations.

Delta replication is supported if the CDS view selects data from one table and from additional fields of tables which are added using LEFT OUTER TO ONE JOIN or equivalent joins. The key of the CDS view must be identical to the key of the main table, thus fields may be renamed.

Delta replication is not supported if the CDS view contains the following features:

  • UNION
  • GROUP BY
  • ABAP Managed Database Procedures (AMBP)
  • Joins with non-key fields in right part of the ON condition
  • INNER JOIN if the join cannot be interpreted as composition relation, i.e., The ON condition of the join contains only key fields of both join partners
  • Complex WHERE conditions, because WHERE conditions typically convert a LEFT OUTER JOIN to an INNER JOIN
  • CDS views that cannot be enabled for delta replications, in the FROM clause (view on view)