Siebel EIM >  SBL-EIM-00905 Could not find foreign key in intersection table that referenced base table being deleted

SBL-EIM-00905 Could not find foreign key in intersection table that referenced base table being deleted

Delete S_PARTY_PER with EIM_Employee:Error 905: Can't find InterTable S_PARTY_PER parent keys


APPLIES TO:
Product Release: V7 (Enterprise)
Version: 7.0.4.18 [14081] FRA Fin Svcs
Database: DB2/390 V7
Application Server OS: IBM AIX 4.3.3
Database Server OS: IBM OS/390


SYMPTOMS
When we create the link between Employees and Positions in S_PARTY_PER using EIM_EMPLOYEE, we are including MISC SQL in the ifb, in order to correctly populate the primarty position in S_CONTACT.PR_HELD_POSTN_ID
MISC SQL = EXPR_S_CONTACT_PR_HELD_POSTN_ID, IMPR_S_CONTACT_PR_HELD_POSTN_ID
This works fine now
The problem happens when we delete S_PARTY_PER
if we don't specify DELETESKIPPRIMARY = FALSE, the task ends up correctly, but S_CONTACT.PR_HELD_POSTN_ID is not updated
If we do specify DELETESKIPPRIMARY = FALSE, the task ends up with Error 905: Can't find InterTable S_PARTY_PER parent keys!, and the column is still not updated.
This is a blocking problem for SG


SOLUTION

For the benefit of other readers:

If EIM deleting of S_PARTY_PER row includes DELETESKIPPRIMARY = FALSE in the .ifb file, it will give the following errors:
Error 905: Can't find InterTable S_PARTY_PER parent keys!
EIM-00905: Could not find foreign key in intersection table that referenced base table being deleted

"DELETESKIPPRIMARY = FALSE" was included because customer wanted to delete the S_PARTY_PER row that associates employee with position, and also update the S_CONTACT.PR_HELD_POSTN_ID primary column.

After EIM failed with error, found that the S_PARTY_PER row is deleted but S_CONTACT.PR_HELD_POSTN_ID still reference the position of the deleted association.

Change Request # 12-DP163N has been logged to address the product defect on this non-intended behavior.

Customer's requirement:
1). Use EIM_EMPLOYEE to delete from S_PARTY_PER to dissociate an employee (S_CONTACT) with his/her old position(s) (S_POSTN);
2). Use EIM_EMPLOYEE to import into S_PARTY_PER to associate the employee with his/her new position(s) and set the new primary position (S_CONTACT.PR_HELD_POSTN_ID). This has to be done during the same night.

Suggestion:
- At step 1, set DELETESKIPPRIMARY = TRUE
- Then at step 2, set EIM_EMPLOYEE.CON_PR_HELD_POSTN to 'Y' and specify "MISC SQL = EXPR_S_CONTACT_PR_HELD_POSTN_ID, IMPR_S_CONTACT_PR_HELD_POSTN_ID" in the .ifb file, so that the import process will set the S_CONTACT.PR_HELD_POSTN_ID values.