Migrate your data : Transfer of data to staging table – instance already exists in the table
In this blog, I’d like to share with you some information about handling duplicate key errors in Migration cockpit.
Migrate Your Data – Migration Cockpit: With this app, you can use staging tables to migrate business data from any legacy system to SAP S/4HANA Cloud.
Migrate Data Using Staging Tables: The SAP S/4HANA migration cockpit creates staging tables for the migration objects that are relevant for your project and migrates data from these staging tables to the target SAP S/4HANA Cloud system.
Template files are provided for every migration object. You can use these template files to fill the staging tables with data. Alternatively, you can fill the staging tables by using your preferred tools (for example SAP Data Services).
While trying to transfer data to staging table, if there is already an instance in the table that has the same key field as the instance to be inserted, following error occurs “Transfer of Data to Staging Tables Failed” – instance already exists in the table. You can view the relevant messages for the file by choosing Show Messages.
There are the following options for handling duplicate key errors:
1. You can delete the file, for example if you know that there are values in the file that are not correct. You can then adjust the file and upload it again.
2. You can proceed with transferring the data in the file to the staging tables. To do this, you select the relevant file and choose Transfer Data to Staging Tables. The system displays the Processing Options screen where you can choose one of the following options:
- o Skip Files with Duplicates
The system will not transfer any data from files that contain duplicate instances.
- o Replace Duplicates with Instances from File
The system will transfer all data from the file to the staging tables except for such duplicate instances. If any duplicate instances exist in the staging tables, they will be deleted from the staging tables and then replaced with the instances from the file. Note that if a duplicate instance has already been successfully migrated, then it will not be deleted from the staging tables.
Please refer to following link for more information about Data Migration in SAP S/4HANA Cloud using Migration Cockpit – https://help.sap.com/viewer/d5699934e7004d048c4801b552f3b013/latest/en-US/121b34742a904d10bca907bbf2fd5617.html