Migrating data into Persistent Custom References¶
When migrating Custom References, the process differs compared to the previously described procedures of Custom Field migrations. After taking these differences in consideration, the Custom Reference Field can be treated as any other Custom Field and the previously described steps can be applied to them.
Migrate data into custom references¶
Consider 'Part Serial' page.
Migrating data into Custom references has to be done using MIGRATE_SOURCE_DATA procedure. There are three steps.
- Export data from source
- Create an intermediate table from exported data
- Migrate data to the original Custom view
Export data from source¶
Create a separate Migration job in order to export data from source environment.
Create an intermediate table from exported data¶
Create another Migration job in order to insert the data into an intermediate table. The example below shows IC_CUS_REF_LOAD_TAB.
Migrate data to the original Custom view¶
Custom references are stored in the Custom Fields table ( INCOME_TYPE_CFT ) as OBJKEYs of the referenced records. Therefore data values cannot be migrated directly into the custom reference attributes. The corresponding OBJKEYs have to be found first using the key of the referenced logical unit and then migrated into the INCOME_TYPE_CFT table. The entity method Get_Objkey can be used in the migration job method list to retrieve the OBJKEY from the key.
Note: Customer ID value has to exist in Destination Environment as well. If not GET_OBJKEY will assign a null value to the reference and that could cause errors.
The result of that should be used in place of the custom reference attribute in the method list attribute setup, for the method INCOME_TYPE_CFP.Cf_New__.
If the OBJKEY is exiting INCOME_TYPE_CFP.Cf_modify__ will be executed or INCOME_TYPE_CFP.Cf_new__ will execute and insert new records.
Migrate custom references between databases¶
The OBKEYs for custom references cannot be migrated to a destination database directly. Instead the logical key values should be extracted at the source database and when migrating into the destination database those keys should be handled as mentioned in migrating data into custom references. For extracting the primary keys, the data source should be joined with the base views of custom references by the OBJKEYs.