Inventory Item Conversions
We can import new items or update the existing items using Item import program.
Pre-requisites:
- Master Organization should be defined
- Child Organization should be defined
- Code Combinations should be defined
- Item Templates (If using item templates in interface table)
- Defining Item Status Codes
- Item Types should be defined
- Items should be loaded into Master organization before assigning to child organizations
Steps Involved:
For any conversion program, we receive the CV40 (Functional Design Document) which details about the purpose and scope of the conversion, required functional setups, Interface/APIs to be used and other details.
We need to develop the CV60 (Technical Design Document) document based on CV40. CV60 document details about the approach we are following, table access details, package names, conversion program details, import program details (if applicable) etc.
Data files:
We get the legacy data in a flat file from the customer.Flat file can be of .csv, .txt, .xls, .xml extensions
Custom Objects:
Staging Table:
Create a staging table to store the legacy data based on the flat file structure. Make sure the staging table has status column to store the record status (status column) at each stage, transaction id to identify each record uniquely and error message column to store the validation errors.
Package:
Create a package to validate the legacy data and load the data into Interface tables or to base tables if using APIs to load the data. Modify the record status after validation and load.
Different statuses a record can have:
- N - New
- V - Validation Successful
- VE - Validation Error
- L - Load Successful
- LE - Load Error
SQL Load:
Create the control file to transfer the data from flat file to staging table. To know more about sql loader click
here
SQL Loader command: sqlldr control = <ctl file name>
Validate the legacy data:
Register a concurrent program using the custom package we created. Submit the concurrent program using SRS window to validate the data. Make sure the program does all the necessary validations.
Mandatory validations for Item conversions are:
- Item number not null
- Description not null
- Organization not null
- Organization should exist in Oracle
- Duplicate Item and Organization combination validation with in the staging table and w.r.t Oracle
- Item Template should exist in Oracle
- Code combination IDs should exist in Oracle
- UOM should exist in Oracle
Update the status column in the staging table accordingly (with V or VE) at the end of validation process.
Load the data:
Pick all the successfully validated items and load them into interface table MTL_SYSTEM_ITEMS_INTERFACE. Populate the transaction_type as 'CREATE' and process_flag as '1'. If you want to submit the import program in batches, populate set_of_process_id with different numbers for each batch of import.
Update the status column in the staging table accordingly (with L or LE) at the end of load process.
Possible values for transaction_type are 'CREATE', 'UPDATE'
Possible values for process_flag are 1= Pending, 2= Assign Complete, 3= Assign/Validation Failed, 4= Validation succeeded; Import failed, 5 = Import in Process, 7 = Import succeeded
Run the Import program:
Go to SRS window and submit '
Import Items' program with appropriate parameters to load the items from Interface table to base tables.
Interface tables:
MTL_SYSTEM_ITEMS_INTERFACE
MTL_ITEM_REVISIONS_INTERFACE (If importing revisions)
MTL_ITEM_CATEGORIES_INTERFACE (If importing categories)
Base tables:
MTL_SYSTEM_ITEMS_B
MTL_ITEM_REVISIONS_B
MTL_CATEGORIES_B
MTL_CATEGORY_SETS_B
MTL_ITEM_STATUS
MTL_ITEM_TEMPLATES
Error table:
MTL_INTERFACE_ERRORS
Common Issues:
- We cannot load master and child items in a single import program. Import the master items first and then import the child items
- Item revision numbers should be in chronological order. For ex: AA, BB, CC... or 1, 2, 3... is valid but AA, 1, BB, 2 etc.is not valid
- Master-Child conflicts. This happen when the master controlled attributes are different between master and child org items