Why Do You Need To Run the EIM Import Twice To Set Certain Foreign Keys?

You need to run the Enterprise Manager Integration (EIM) Import process twice when there are two non-target base tables mapped to one interface table and one non-target base table has a foreign key to a column in the other non-target base table. In this scenario, the data in the same row of the interface table cannot be inserted into the two base tables in one EIM batch or session.

The reason you need to run EIM twice is because during step 4 of the EIM Import process, the non-target parent base table is queried to resolve the foreign key of the non-target child base table, but the new row in the parent table has not yet been inserted. Therefore, when the first EIM process is run, you may receive errors in your EIM log file indicating a failure to resolve foreign keys, similar to the following:
This is a foreign key value in the base table and the values in the interface table did not resolve to existing values. Verify that the IF columns correspond to existing base table rows.
To import rows into the two non-target base tables with a foreign key reference, you need to run this EIM Import process twice, or use two import sessions in one batch. The first import inserts the new parent row in the non-target parent base table, and the second import inserts the new child row in the non-target child base table.
An example that illustrates this scenario is inserting data from a row in the EIM_CONTACT table into S_PARTY, S_CONTACT, S_ADDR_PER, and S_CON_ADDR. In Siebel Industry Applications 7.5, the EIM_CONTACT interface table mapping does not allow you to complete this import in one batch because the foreign key column ADDR_PER_ID of the non-target child base table S_CON_ADDR points to the corresponding row ID in the non-target parent table S_ADDR_PER. To import this row and set the foreign key correctly, you should run the first EIM import process to insert the row into S_PARTY, S_CONTACT, S_ADDR_PER, then run a second EIM import session to set the foreign key in the S_CON_ADDR table.

1 comment on “Why Do You Need To Run the EIM Import Twice To Set Certain Foreign Keys?”

  1. Chinmoy Reply

    Instead of running the EIM process twice it would be better to built to 3 processes in the IFB
    1)create contact
    2)create Address
    3) Create Contact Address Mapping

Leave A Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!