You are on page 1of 5

Item Conversion

Item conversion is nothing but importing the item and its details from staging table to interface table with
some validations and then from interface table to base table.

Items from staging table to interface table is done by below Validation procedure and from Interface Table
to base table is done by running standard the concurrent program Import Items.

Item Conversion Steps

You can import items from any source into Oracle Inventory using the Item Interface

Following is the approach for Item conversion.

Step 1:

We will get the flat file from the customer. Flat file types: .csv, .txt, .xls.

Step 2:

Create a staging table based on the flat file structure.


Create the error table.

Step 3:
Create the control file to transfer the data from flat file to staging table using SQL * Loader:

Following are the files we will come across while working with SQL* Loader.
Control file .ctl to transfer the data from flat file to staging table.
Flat file .csv raw data file which we will receive from legacy system
Log file .log It will display the execution of the program.
Bad file .bad These records could have been rejected by SQL*Loader
Discard file .dis It will contain records that didn't meet the criteria.

Step 4 :
Run the control file.
Now the data has been transferred to staging table.

Step 5:
Create a PL/SQL validation program to validate the records and to transfer the records to the
interface table.

The item interface table MTL_SYSTEM_ITEMS_INTERFACE contains every column in the Oracle
Inventory item master table, MTL_SYSTEM_ITEMS_B. The columns in the item interface
correspond directly to those in the item master table.
Step 6:
If the record is validated then status_flag should be updated with V.
If the record is error out then status_flag should be updated with E and the record should be
inserted into custom error table.

Step 7:
PL/SQL program will pick the validate records and then inserted into the interface table.

Step 8:
Run the standard concurrent program to Import items to transfer the data from Interface table to
base table.

Base tables:
MTL_SYSTEM_ITEMS_B

Error table:
MTL_INTERFACE_ERRORS

Required Columns for MTL_SYSTEM_ITEMS_INTERFACE


ITEM_NUMBER
DESCRIPTION
ORGANIZATION_CODE
PROCESS_FLAG
TRANSACTION_TYPE
SET_PROCESS_ID (any numeric value)

Validations for Item Import:

1) Transaction_type should be CREATE


2) ORGANIZATION CODE should be exist. (standard table: ORG_ORGANIZATION_DEFINITIONS)
3) Item number should not be exist. )standard table: mtl_system_items_b)
4) Description should be not null.
5) Item template should be exist and valid. (standard table: mtl_item_templates)
6) Item and organization combination should not exist.
7) PROCESS_FLAG should be 1. (The column is used to identify status of record)
8) UOM should be exist. (standard table: MTL_UNITS_OF_MEASURE)
9) Validation for Item Type (standard table: FND_COMMON_LOOKUPS)
Required Data:

ITEM_NUMBER or SEGMENT
Every row in the item interface table must identify the item and organization. To identify the item when
importing it, you may specify either the ITEM_NUMBER or SEGMENTn columnsthe Item Interface
generates the INVENTORY_ITEM_ID for you.

ORGANIZATION_ID or ORGANIZATION_CODE
You need to specify either the ORGANIZATION_ID or ORGANIZATION_CODE that identifies the organization.

DESCRIPTION
When you import a new item, you are also required to specify the DESCRIPTION.

TRANSACTION_TYPE & PROCESS_FLAG


There are two other columns the Item Interface uses to manage processing. They are TRANSACTION_TYPE,
which tells the Item Interface how to handle the row, and PROCESS_FLAG, which indicates the current status
of the row.
Always set the TRANSACTION_TYPE column to CREATE, to create an item record (true when both importing
a new item and assigning an already existing item to another organization). This is the only value currently
supported by the Item Interface. The Item Interface uses the PROCESS_FLAG to indicate whether processing
of the row succeeded or failed. When a row is ready to be processed, give the PROCESS_FLAG a value of 1
(Pending), so that the Item Interface can pick up the row and process it into the production tables .

Process Flag Meaning

Code Code Meaning

1 Pending

2 Assign complete

3 Assign/validation failed

4 Validation succeeded; import failed

5 Import in process

7 Import succeeded
Parameter description
All Organizations:
Yes: Run the interface for all organization codes in the item interface table.
No: Run the interface only for the organization you are currently in. Item interface rows for
organizations other than your current organization are ignored.

2] Validate Items:
Yes: Validate all items and their data residing in the interface table that have not yet been validated. If
items are not validated, they will not be processed into Oracle Inventory.
No: Do not validate items in the interface table.

3] Process Items:
Yes: All qualifying items in the interface table are inserted into Oracle Inventory.
No: Do not insert items into Oracle Inventory.

4] Delete Processed Rows:


Yes: Delete successfully processed items from the item interface tables.
No: Leave all rows in the item interface tables.

5] Process Set:
Enter a number for the set id for the set of rows you want to process. The program picks up the rows
marked with that id in the SET_PROCESS_ID column. If you leave this field blank, all rows are picked
up for processing regardless of the SET_PROCESS_ID column value.
Errored Records

If a row fails validation, the Item Interface sets the PROCESS_FLAG to 3 (Assign/validation failed) and inserts
a row in the interface errors table, MTL_INTERFACE_ERRORS. To identify the error message for the failed
row, the program automatically populates the TRANSACTION_ID column in this table with the
TRANSACTION_ID value from the corresponding item interface table.

Resubmitting an Errored Row:


During Item Interface processing, rows can error out either due to validation (indicated by PROCESS_FLAG = 3 in
MTL_SYSTEM_ITEMS_INTERFACE and the corresponding error in MTL_INTERFACE_ERRORS) or due to an Oracle
Error.
When an Oracle Error is encountered, the processing is stopped and everything is rolled back to the previous save point.
This could be at PROCESS_FLAG = 1, 2, 3, or 4.
When you encounter rows errored out due to validations, you must first fix the row corresponding to the error with the
appropriate value. Then reset PROCESS_FLAG = 1, INVENTORY_ITEM_ID = null, and TRANSACTION_ID = null. Then
resubmit the row for reprocessing.

You might also like