Thursday, June 26, 2014

Debugging for IF_ROW_STAT value as NOT_ALLOWED

What is IF_ROW_STAT column?

IF_ROW_STAT column in an EIM table is among the mandatory system columns that need to be populated before running the EIM job. It's purpose is to reflect the EIM row status after EIM processing. You can populate this column with any alphanumeric value not exceeding 30 characters. Commonly we initially populate this column with something like "FOR_IMPORT", "FOR_DELETE", "FOR_MERGE" for import, delete and merge operation respectively. After EIM processing i.e. when the IFB runs this value changes for each record and is replaced by the row status, whether processed successfully or not. This is the column that you should look first to know the status of records after EIM job finishes.


What does NOT_ALLOWED in IF_ROW_STAT column mean?


In simple words Not Allowed means, EIM engine is trying to do some operation on base tables but one or more parameters in the IFB is not allowing it to do. For example, EIM fetches the user key combination from the EIM table and tries to find it in siebel base table and if no match is found it would try to insert the record in base table, but in IFB file you would have mentioned something like say INSERT ROWS = S_ORG_EXT, FALSE. So in this case EIM will throw error and IF_ROW_STAT will be populated as NOT_ALLOWED.


In short EIM, is trying to do something and IFB is not allowing it. Simple as that.


This error can come in following scenarios/operations:


a) In Import operation, when EIM tries to insert records but IFB mentions that insert in the table is not allowed (as explained above).


b) In Import operation, when EIM tries to update records but IFB mentions that insert and update in the table is not allowed.


c) In Merge operation, when EIM tries to merge and update records but IFB mentions that update in the table is not allowed.


Illustration:


Lets take a simple example of updating Accounts through EIM_ACCOUNT table. Now, suppose you have populated all the user key columns and the columns that you need to update and your IFB looks something like this:


[Siebel Interface Manager]

PROCESS = "ACCOUNT_LOAD"

[ACCOUNT_LOAD]
TYPE = SHELL
INCLUDE = "UPDATE_ACCOUNTS"
[UPDATE_ACCOUNTS]
TYPE  = IMPORT
BATCH = 100
TABLE = EIM_ACCOUNT
ONLY BASE TABLES = S_PARTY, S_ORG_EXT
 ONLY BASE COLUMNS = S_PARTY.PARTY_UID, S_PARTY.PARTY_TYPE_CD, S_ORG_EXT.NAME, S_ORG_EXT.LOC, S_ORG_EXT.BU_ID, S_ORG_EXT.ALT_EMAIL_ADDR

INSERT ROWS = S_PARTY, FALSE
UPDATE ROWS = S_PARTY, FALSE
INSERT ROWS = S_ORG_EXT, FALSE
UPDATE ROWS = S_ORG_EXT, TRUE

Now since you do not want accounts to be loaded but only existing accounts records needs to be updated, you have put INSERT ROWS = S_ORG_EXT, FALSE and UPDATE ROWS = S_ORG_EXT, TRUE

EIM identifies the records in siebel by comparing the user key columns from EIM table. The error scenario is that if you do not populate the user keys properly in the EIM table or populate it incorrectly then EIM fails to find the record to update in the base table. This results in EIM attempting to create new records in siebel, but since you have mentioned as INSERT ROWS = S_ORG_EXT, FALSE EIM will not be able to do that, throwing an error of NOT_ALLOWED and terminates the process.


Resolution:


To resolve this error, there are 2 scenarios:


a) If your requirement is only to update and no insertion should happen then ensure that you populate the user keys correctly. All the user key combinations should already exists in siebel.


b) If your requirement allows the update as well as insert if account not found in siebel then, change the parameter INSERT ROWS = S_ORG_EXT, FALSE to

INSERT ROWS = S_ORG_EXT, TRUE or just remove this parameter, as the default is to insert and update.

Same conditions and resolution scenarios apply for merge process as well.