Smart Data Integration (SDI) – source data preparation

Introduction
SDI provides two data replication approaches. We can use them with the SAP HANA Web-based Development Workbench:
- Replication task (To replicate data from objects in a remote source into SAP HANA tables, you must configure the replication process by creating an .hdbreptask file, which opens a file specific to the Replication Editor.)
- Flowgraph is a graphical model of data flow which can include numerous objects such as:
- Tables, views, and procedures from the SAP HANA catalog
- Transformations such as projections, filters, unions, and joins
- Functions from Application Framework Modeling (AFM).
- Attribute views and calculation views, and so on.
- Runtime behaviours
You should keep in mind that all created objects should be transportable into further systems. In the following blogs I will explain the process and dependencies in detail.
It is rather difficult to come across the same database data models in different systems. Usually we need to combine data from one data model to another and only after that put it into a target table.
S/4HANA system – tables
For demonstration purposes I have prepared a couple of tables in source S/4 HANA system and put some test data there. First table holding current status of a unique object:


The second table carrying dummy flags of an object:


First of all, in order to have all the objects in one place we should create a package.

Next step is a HDB schema creation. In this case we just need to create and save a file with corresponding extension: .hdbschema.

As I already mentioned in my previous blog the direction of data replication is not so common and we are going to move data from S/4 HANA to ORACLE. We already created a remote source and virtual table as a target of a data flow.
Now we should prepare the source part. In order to access S/4 HANA ABAP table contents and use them in our custom schema we should create corresponding synonyms:

Based on synonyms we should create HDB views (file with extension .hdbview), which present data stored in the source tables. In order to make the process a little more complex in the first view we will split data which is stored in one field into four columns:

In the second .hdbview we will use WHERE clause to restrict selected data.

Note: In order to enable realtime replication we would have to create a Virtual Table on top of HANA SDI adapter. The virtual tables would point to the tables mentioned above. Field split and filtering would be incorporated into the flowgraph itself with the use of tools made available in the flowgraph toolset.
Now we have two data sets from different table synonyms. In the third view we will join them to have a final dataset for replication.

At this point source of data is ready. In order to check the data we have at the source side, just go to IDE-Catalog and select Open Content on each object you have created.

SAP Hana Wed-base Development workbench is a powerful tool which allows you to combine, sort and filter data you want to replicate. You can see the data set which will be sent to target below:

In case you have any questions about SDI please feel free to comment under the blog.
PS. SDI version used: 2.2.4 on HANA 1.0
Popular tags
ABAP int4 INT4 IFTT Int4Interview S/4HANA SAP AIF SAP CPI sap integration