http://ebsanil.blogspot.sg/2012/09/customer-item-cross-references-in-oracle.html
BEGIN
INSERT INTO MTL_CI_INTERFACE(PROCESS_FLAG
,PROCESS_MODE
,LOCK_FLAG
,LAST_UPDATED_BY
,LAST_UPDATE_DATE
,LAST_UPDATE_LOGIN
,CREATED_BY
,CREATION_DATE
,TRANSACTION_TYPE
,CUSTOMER_ID
,ADDRESS_ID
,CUSTOMER_ITEM_NUMBER
,CUSTOMER_ITEM_DESC
,ITEM_DEFINITION_LEVEL
,COMMODITY_CODE_ID
,INACTIVE_FLAG
)
VALUES (1--PROCESS_FLAG
,1--PROCESS_MODE
,'N'--LOCK_FLAG
,nUser_Id--LAST_UPDATED_BY
,sysdate--LAST_UPDATE_DATE
,nUser_Id--LAST_UPDATE_LOGIN
,nUser_Id--CREATED_BY
,sysdate--CREATION_DATE
,'CREATE'--TRANSACTION_TYPE
,nCust_Account_Id --CUSTOMER_ID
,l_address_id--ADDRESS_ID
,citm_rec.CUSTOMER_ITEM --CUSTOMER_ITEM
,citm_rec.CUSTOMER_ITEM_DESC--CUSTOMER_ITEM_DESC
,citm_rec.ITEM_DEFINITION_LEVEL --ITEM_DEFINITION_LEVEL
,citm_rec.COMMODITY_CODE_ID
,2 --citm_rec.INACTIVE_FLAG
);
END;
---After inserting customer items into the interface table
---run the Import program Import Customer Items
---Navigation to run the program: Inventory--> Reports --> All.
---Parameters: Abort On Error=N, Delete Record =Y
---After running import program verify the base table MTL_CUSTOMER_ITEMS
BEGIN
insert into MTL_CI_XREFS_INTERFACE (PROCESS_FLAG
,PROCESS_MODE
,LOCK_FLAG
,LAST_UPDATE_DATE
,LAST_UPDATED_BY
,CREATION_DATE
,CREATED_BY
,LAST_UPDATE_LOGIN
,TRANSACTION_TYPE
,CUSTOMER_ID
,ADDRESS_ID
,CUSTOMER_ITEM_NUMBER
,ITEM_DEFINITION_LEVEL
,INVENTORY_ITEM_ID
,MASTER_ORGANIZATION_ID
,PREFERENCE_NUMBER
,INACTIVE_FLAG
)
values (1--PROCESS_FLAG
,1--PROCESS_MODE
,'N'--LOCK_FLAG
,sysdate--LAST_UPDATE_DATE
,nUser_Id--LAST_UPDATED_BY
,sysdate--CREATION_DATE
,nUser_Id--CREATED_BY
,nUser_Id--LAST_UPDATE_LOGIN
,'CREATE'--TRANSACTION_TYPE
,nCust_Account_Id--CUSTOMER_ID
,l_address_id--ADDRESS_ID
,citm_rec.CUSTOMER_ITEM
,citm_rec.ITEM_DEFINITION_LEVEL
,nInventory_Item_Id
,111 --Currently hardcoded the master organization id value
,dtl_rec.rank--nPreference_Number--PREFERENCE_NUMBER
,2 --citm_rec.INACTIVE_FLAG
);
END;
---After inserting customer items cross references into the interface table
---run the Import program, Import Customer Item Cross References
---Navigation to run the program: Inventory--> Reports --> All.
---Parameters: Abort On Error=N, Delete Record =Y
---After running import program verify the base table MTL_CUSTOMER_ITEM_XREFS
No comments:
Post a Comment