Blog Siebel

siebel eim if_row_stat not_allowed

I've been pulling my hair the other day because I keep on getting the NOT_ALLOWED output in IF_ROW_STAT. The purpose of the migration is to update two fields in the base table S_ASSET. Specifically, the fields are status_cd and end_dt. For this trivial task, I just needed to expose the user keys then the two fields to be updated and I'm done. Sounds simple, right? Right! Here's the relevant portion of my IFB.


[UPDATE_ASSET]
TYPE = IMPORT
BATCH = $BATCH
TABLE = EIM_ASSET
LOG TRANSACTIONS = FALSE
NET CHANGE = FALSE
ONLY BASE TABLES = S_ASSET
INSERT ROWS = S_ASSET,FALSE
UPDATE ROWS = S_ASSET,TRUE
ONLY BASE COLUMNS = S_ASSET.ASSET_NUM, \
S_ASSET.PROD_ID, \
S_ASSET.REV_NUM, \
S_ASSET.BU_ID, \
S_ASSET.END_DT, \
S_ASSET.STATUS_CD

I don't see any problem here. The task completes successfully in Siebel but nothing is updated. When I looked at the IF_ROW_STAT, all records in the EIM_ASSET is set to NOT_ALLOWED. I checked the data I populated in the EIM_ASSET and everything looked fine. I got the asset_num populated, rev_num is set to NULL and prod_id is all sorted out. Or so I thought it was.

The Culprit


I know prod_id is a foreign key so I have to populate the prod_id user keys in EIM_ASSET properly. And I had one assumption that is totally wrong -- all *_BU should be populated with "Default Organization". As it turns out, the prod_ven_bu of the product (S_PROD_INT) is set to NULL and since I populated it with "Default Organization", EIM cannot find the matching record.

Solution


The quick solution is set EIM_ASSET.PROD_VEN_BU to NULL as its reference table (S_PROD_INT) has no value set in it. After a quick change on my extraction script, everything went smoothly. The main lesson here is not to assume what should be written into the field. It might be helpful and efficient to hard code some things we are certain with but the foreign keys are there for a reason. That means we need to extract the foreign keys properly to have a trouble-free loading.

Log of my Life


I'd like to add that I only found the problem by sifting through the logs. There, I found that the prod_id is not being populated because no matching record is found. And since my IFB doesn't allow insert of new s_prod_int, the EIM will set the record status to 'NOT_ALLOWED'.