Subject:  A Guide to Using the Bill of Material (BOM) Open Interface
  Doc ID:  Note:93605.1 Type:  WHITE PAPER
  Last Revision Date:  16-APR-2004 Status:  PUBLISHED

      A Guide to Using the Bill of Material (BOM) Open Interface

This paper serves as a reference when using the BOM Open Interface.
It defines the tables used in importing bills and explains the mandatory,
derived and optional columns.  Refer to the Oracle Manufacturing, Distribution,
Sales and Service Open Interfaces Manual (A-57332) for a complete set of
instructions.

1.  TABLES.
You need to populate following interface tables with data from your legacy
system:
    BOM_BILL_OF_MTLS_INTERFACE
    BOM_INVENTORY_COMPS_INTERFACE
    BOM_ASSY_COMMENTS_INTERFACE
    BOM_REF_DESGS_INTERFACE
    BOM_SUB_COMPS_INTERFACE|
    MTL_ITEM_REVISIONS_INTERFACE
Once you load the data into the interface tables, you can launch the
Bill and Routing Interface program from the Import Bills and Routings
form in Oracle Bills of Material or Oracle Engineering.  This program
assigns values, validates the data you include, and then imports the
new bills of material (BOMs).
You can optionally create an item revision when you import a BOM, by
inserting a value for a revision at the same time you insert your BOM data.
If you enter a value in the REVISION column of the BOM_BILL_OF_MTLS_INTERFACE
table, the Bill and Routing Interface program inserts a row into the
MTL_ITEM_REVISIONS_INTERFACE table.  In order to assign multiple item revisions,
it is better to insert data directly into the MTL_ITEM_REVISIONS_INTERFACE
table.
In order to import a BOM with components, you need to populate:
 
    BOM_BILL_OF_MTLS_INTERFACE
    BOM_INVENTORY_COMPS_INTERFACE
With these two tables, you can create BOM header information and assign
component details.
If you want to assign standard comments, reference designators, and
substitute components to your BOM, you need to populate:
 
    BOM_ASSY_COMMENTS_INTERFACE
    BOM_REF_DESGS_INTERFACE
    BOM_SUB_COMPS_INTERFACE
    PROCESS_FLAG
The column PROCESS_FLAG indicates the current state of processing for a row
in the interface table.  All inserted rows must have the PROCESS_FLAG set to 1.
After populating the data into the interface tables, run the Bill and
Routing Interface program.  The program assigns and validates all rows
with a status of 1 (Pending), and then imports them into the production
tables.  If the assign or validate procedure fails for a row, the program
sets the PROCESS_FLAG to 3 (Assign/Validation Failed) for that row.
The successful rows continue through the process of importing into the
production tables.  If a row fails on import, the program assigns a value of
4 (Import Failed) to the PROCESS_FLAG.  Successfully imported rows have a
PROCESS_FLAG value of 7 (Import Succeeded).

2.  TRANSACTION AND REQUEST ID'S.
The Bill and Routing Interface program automatically updates the
TRANSACTION_ID and REQUEST_ID columns in each of the interface tables. 
The column TRANSACION_ID stores a unique id for each row in the interface
table and the REQUEST_ID column stores the concurrent request id number.

3.  IMPORT CONSIDERATIONS.
Even though you can import bills and routings simultaneously, all
routing operations must exist before you can assign a component to an
operation.  If a routing does not exist, you cannot assign an operation
sequence to a component on a BOM.
You can simultaneously import primary and alternate BOMs. Since the Bill and
Routing Interface program validates data the same way the Define Routing or
Define Engineering Routing form verifies data, you cannot define an alternate
bill if the primary bill does not exist.  Therefore, you should import primary
BOMs before importing alternate BOMs.  If the program tries to validate an
alternate bill before validating the primary bill, the record fails.

4.  BOM_BILL_OF_MTLS_INTERFACE TABLE.
    a.  REQUIRED COLUMNS FOR BOM_BILL_OF_MTLS_INTERFACE.
        You must always enter values for the following required columns
        when you insert rows into the BOM_BILL_OF_MTLS_INTERFACE table:
        ASSEMBLY_ITEM_ID 
        ORGANIZATION_ID 
        ASSEMBLY_TYPE 
        PROCESS_FLAG 
        If you create an alternate BOM, you must also enter a value in the
        ALTERNATE_BOM_DESIGNATOR column.
        If the BOM you import references a common BOM, you must enter a value
        in the COMMON_ORGANIZATION_ID and COMMON_ASSEMBLY_ITEM_ID columns, or
        you can enter a value in the COMMON_BILL_SEQUENCE_ID column.  If the
        bill does not reference a common bill, the Bill and Routing interface
        program defaults the value of the BILL_SEQUENCE_ID for the
        COMMON_BILL_SEQUENCE_ID.
        You can specify in the ASSEMBLY_TYPE column whether the BOM is a
        manufacturing BOM or an engineering BOM.  If you do not include a value
        for this column, Oracle Bills of Material defaults a value of 1
        (manufacturing), and creates a manufacturing BOM.  To create an
        engineering bill, you must enter a value of 2 (engineering) for the
        ASSEMBLY_TYPE column.
        For each new row you insert into the BOM_BILL_OF_MTLS_INTERFACE table,
        you should set the PROCESS_FLAG to 1 (Pending).

    b.  DERIVED/DEFAULTED VALUES FOR BOM_BILL_OF_MTLS_INTERFACE.
        The Bill and Routing Interface program derives or defaults most of the
        data required to create a manufacturing or an engineering BOM.  The
        Bill and Routing Interface program derives or defaults the columns
        using the same logic as the Define Bill of Material form or the Define
        Engineering Bill of Material form.  When you populate a column in the
        interface table, the program imports the row with the data you included
        and does not default a value.
        BOM_BILL_OF_MTLS_INTERFACE     Derived or Defaulted Value
        ASSEMBLY_ITEM_ID             From ITEM_NUMBER
        ORGANIZATION_ID                     From ORGANIZATION_CODE
        LAST_UPDATE_DATE             System Date
        LAST_UPDATE_BY                     Userid
        CREATION_DATE                     System Date
        CREATED_BY                     Userid
        COMMON_ASSEMBLY_ITEM_ID             From COMMON_ITEM_NUMBER
        ASSEMBLY_TYPE                     1
        COMMON_BILL_SEQUENCE_ID             Sequence BOM_INVENTORY_COMPONENTS_S
        COMMON_ORGANIZATION_ID             From COMMON_ORG_CODE
        REQUEST_ID