Special considerations for ABAP sources/targets on HANA
I want to share with you some special considerations and settings that has to be defined for specific tables if you replicate from an ABAP source or into an ABAP target that is using HANA as a database. I copied the note text:
2319897 – SLT – Replicating data from tables with no primary key on DB level
You are replicating data from an ABAP-based SAP system running on SAP HANA, and you face the following issue: You want to replicate data from an SAP application table whose primary key is defined in the ABAP Dictionary, not in the database. You want to replicate data into an SAP application table whose primary key is defined in the ABAP Dictionary, not in the database. This SAP Note explains how to avoid inconsistencies when replicating data from such tables.
Reason and Prerequisites
You use SAP LT Replication Server with release DMIS 2011
Within an SAP HANA-based SAP system (i.e. SAP S/4HANA, SAP Business Suite on SAP HANA) there are SAP application tables whose primary key is defined in the ABAP Dictionary, not in the database. This has been designed in order to save memory space in the in-memory SAP HANA database. Application logic of the source system ensures that no duplicate records occur.
The list of currently known tables include:
The replication of data can result in duplicate records in the target system if no primary key (including a unique constraint) has been defined in the database for the target table.
1.) If you are using an RFC connection to connect to the receiver system, SLT expects the table to exist already. In this scenario SLT won’t create any primary key (including a unique constraint) on the
2.) If you are using an RFC connection to connect to the source system database (standard option for an ABAP-based SAP system), SAP LT Replication Server will create a primary key (including a unique constraint) for the target table in the database automatically. This setting should not be changed, because otherwise replication of data into that table may cause duplicate records and therefore inconsistencies.
3.) If you are using a direct database connection (connection type DBCON) to connect to the source system database, SAP LT Replication Server will not find a primary key in the source system database for the relevant table, and therefore cannot create a trigger. Data cannot be replicated to the target system.
– For each table whose primary key is defined in the ABAP Dictionary, not in the database, you need to explicitly tell SLT which fields to use to track changes. You therefore have to create entries in the following SLT delivered table IUUC_DB_TAB_KEYS according to the SAP ABAP Dictionary key definition of the application table.
– You can now start the replication of the table (or tables). In the target system, the target structure will be created according to the database view that was created in the source system (including the primary key and related unique constraint).
Thank you Tobias for that special input. I will try that out in my demo system for replicating table from hana to ecc and share the outcome.
I have replicated a table from ECC to HANA using SLT. It had two fields namely defined as primary key(client field). The same table also gets replicated from Hana to ECC using SLT.
By default the SAP application tables have client marked as key. So when I replicate it from Hana, in table IUUC_DB_TAB_KEYS, this will also be marked as key, but values continue to be the same for all records. It throws a duplicate error while storing.
Moreover, there is one more area around abap to hana and hana to abap replication for mapping values. Can you share any documentation showing a table example or something.