Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Saturday, September 17, 2016

Oracle Bills Of Material (BOM) Interfaces

This paper covers creating, updating, and deleting Bills of Material and Routings using the BOM open interfaces. The following information represents the requirements for release 11. Additional information can be inserted by adding the column name and value to the second and third lines, respectively, in the sql scripts at the end of this paper.

You can use the Bill and Routing Interface program to create, update, or delete Manufacturing and Engineering bills of material and product families.
When you import a bill of material, the BOM Item Type attribute of the parent item determines the type of bill created, including planning, model, option class, and standard bills. For example, if you import a model item and then import its bill, the Bill and Routing Interface program creates the bill as a model bill of material.

The Bill and Routing Interface validates your data the same way Oracle Bills of Material and Oracle Engineering verifies bills of material and product families entered manually.

The Bill and Routing Interface program derives or defaults the columns using the same logic as the Bills of Material window. When you populate a column in the interface table, the program imports the row with the data you include and will not default a value. However, if you do not enter data in a derived or defaulted column, the program automatically imports the row with the derived or defaulted value. If you enter a value for the ITEM_NUMBER or COMMON_ITEM_NUMBER column, you must insert the system item flexfield separator between each segment of your item number. When the Bill and Routing Interface program derives the segment values for an item, it searches for this separator to indicate the end of one segment value and the start of the next segment value.

If you import a manufacturing bill of material, the bill is visible to both Oracle Bills of Material and Oracle Engineering. However, if you import an engineering bill of material, it is only accessible through Oracle Engineering.

You should import primary bills of materials before importing alternate bills. If the program tries to validate an alternate bill before validating the primary bill, the record fails.

All products (items) and components need to be set up and assigned to the proper organizations in the Inventory Application before beginning the BOM import process.

Although you can import bills and routings simultaneously, all routing operations must exist before you can assign a component to an operation. If the routing does not exist, you cannot assign an operation sequence to a component on a bill of material.

Note: the OPERATION_SEQ_NUM must be set to 1 if no routing has been defined.
Resources must be defined in BOM application and assigned to departments before they can be assigned to an operation.

Departments must be defined in the BOM application before you can add an operation using the BOM_OP_SEQUENCE_INTERFACE.

Standard operations must be defined in Oracle Bill of Materials before they can be assigned to a Manufacturing or Engineering routing.
You cannot dynamically create locations for your subinventories using the interface tables. If you specify a value for the COMPLETION_LOCATOR_ID column, the location must already exist in Oracle Inventory.

Since you launch and manage the Bill and Routing Interface program through the concurrent manager, you must insure that the concurrent manage is running before you can import any bills.

After populating the interface tables, you can run the Bill and Routing Interface program. The column, PROCESS_FLAG, indicates the current state of processing for a row in the interface table. Possible values for the column include:
1 - Pending
2 - Assigned Succeeded
3 - Assign/Validation Failed
4 - Validation Succeeded
7 - Import Succeeded

You can use the following sql scripts to check for errors which will be located in the MTL_INTERFACE_ERRORS table to help resolve problems.
select table_name, column_name, organization_id, message_name, error_message
from mtl_interface_errors
where request_id = 894321; -->Request ID

or
select table_name, column_name, organization_id, message_name, error_message
from mtl_interface_errors
where transaction_id = 785435;


At the end of this paper are numerous sql scripts that you can use to find the information required for the import process. Also included are sample scripts to enter all of the required information into each of the interface tables.

BOM_BILL_OF_MTLS_INTERFACE TABLE
This table temporarily stores bills of material header information. Each row in this table represents a unique
Manufacturing or Engineering bill and is identified by the BILL_SEQUENCE_ID.

If you are creating an alternate bill of material you must also enter a value in the ALTERNATE_BOM_DESIGNATOR column.
If you enter something into REVISION, Oracle Bills of Materials will insert a record into MTL_ITEM_REVISIONS.
If the bill you import references a common bill of material, 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.
The Bill and Routing Interface program derives the COMMON_BILL_SEQUENCE_ID from the COMMON_ITEM_ID, COMMON_ORGANIZATION_ID, AND ALTERNATE_BOM_DESIGNATOR.

The required fields to create a Bill in the BOM_BILL_OF_MTLS_INTERFACE table are:
PROCESS_FLAG
ORGANIZATION_ID
ASSEMBLY_ITEM_ID
ASSEMBLY_TYPE
TRANSACTION TYPE
The PROCESS_FLAG needs to be 1 for pending.
The ASSEMBLY_TYPE of the BOM; is 1 for manufacturing, and 2 for engineering.
The TRANSACTION_TYPE needs to be 'create'.
The required fields to update a Bill using the BOM_BILL_OF_MTLS_INTERFACE table are:
PROCESS_FLAG
BILL_SEQUENCE_ID
or
ASSEMBLY_ITEM_ID or ITEM_NUMBER,
ALTERNATE_BOM_DESIGNATOR, and
ORGANIZATION_ID or ORGANIZATION_CODE
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'update'.
The required fields to delete a Bill using the BOM_BILL_OF_MTLS_INTERFACE table are:
PROCESS_FLAG
BILL_SEQUENCE_ID
or
ALTERNATE_BOM_DESIGNATOR,
ASSEMBLY_ITEM_ID or ITEM_MUMBER, and
ORGANIZATION_ID or ORGANIZATION_CODE
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'delete'.
In order to delete a Bill using the interface table, you must also insert a record into the
BOM_INTERFACE_DELETE_GROUPS table with the following values:
ENTITY_NAME (Must be BOM_BILL_OF MTLS_INTERFACE)
DELETE_GROUP_NAME (A new name or name of an existing Delete Group for bills)
DESCRIPTION (Description of the delete group)

BOM_INVENTORY_COMPS_INTERFACE
This table temporarily stores information about bill of material components and is shared by the Bills of
Material and the Engineering Change Order open interfaces. The Engineering Change Order open interface will be available at a future date.
You cannot dynamically create locations for your subinventories using the interface tables. If you specify a value for the LOCATION_ID column, the location must already exist in Oracle Inventory.
You must specify a value in the ALTERNATE_BOM_DESIGNATOR column if you assign components to an alternate bill of material and have not entered a value for the BILL_SEQUENCE_ID column.
You can enter one reference designator and one substitute component for each component you enter.
Oracle Bills of Materials will insert these records into the tables, BOM_REFERENCE_DESIGNATORS and BOM_SUBSTITUTE_COMPONENTS, respectively.
Oracle Bill of Material, enforces that only one row for a component in an operation is effective at a given time.

The required fields for creating components using the BOM_INVENTORY_COMPS_INTERFACE are:
PROCESS_FLAG
COMPONENT_ITEM_ID
COMPONENT_SEQUENCE_ID - user should not be populating the component sequence id as it gets generated during the import
OPERATION_SEQ_NUM
EFFECTIVITY_DATE
BILL_SEQUENCE_ID
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'create' for creating a component.
Note: the OPERATION_SEQ_NUM must be set to 1 if no routing has been defined.

The required fields for updating components using the BOM_INVENTORY_COMPS_INTERFACE are:
COMPONENT_SEQUENCE_ID
or
BILL_SEQUENCE_ID,
COMPONENT_ITEM_ID or COMPONENT_ITEM_NUMBER,
OPERATION_SEQ_NUM, and EFFECTIVITY_DATE
or
ASSEMBLY_ITEM_ID or ASSEMBLY_ITEM_NUMBER, ALTERNATE_BOM_DESIGNATOR,
ORGANIZATION_ID or ORGANIZATION_CODE,
COMPONENT_ITEM_ID or COMPONENT_ITEM_NUMBER,
OPERATION_SEQ_NUM, and EFFECTIVITY_DATE
You also need to enter:
PROCESS_FLAG
TRANSACTION_TYPE
If the component is unimplemented, you cannot update the record.
If you want to update the OPERATION_SEQ_NUM or EFFECTIVITY_DATE, then you must fill in the NEW_OPERATION_SEQ_NUM or NEW_EFFECTIVITY_DATE column.
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'update' for updating a component.

The required fields for deleting components using the BOM_INVENTORY_COMPS_INTERFACE are:
COMPONENT_SEQUENCE_ID
or
BILL_SEQUENCE_ID,
COMPONENT_ITEM_ID or COMPONENT_ITEM_NUMBER,
OPERATION_SEQ_NUM, and EFFECTIVITY_DATE
or
ASSEMBLY_ITEM_ID or ASSEMBLY_ITEM_NUMBER, ALTERNATE_BOM_DESIGNATOR,
ORGANIZATION_ID or ORGANIZATION_CODE,
COMPONENT_ITEM_ID or COMPONENT_ITEM_NUMBER,
OPERATION_SEQ_NUM, and EFFECTIVITY_DATE

You also need to enter:
PROCESS_FLAG
TRANSACTION_TYPE
If the component is unimplemented, you cannot delete the record.
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'delete'.
In order to delete a component using the interface table, you must also insert a record into the
BOM_INTERFACE_DELETE_GROUPS table with the following values:
ENTITY_NAME (Must be BOM_INVENTORY_COMPS_INTERFACE)
DELETE_GROUP_NAME (A new name or name of an existing Delete Group for bills)
DESCRIPTION (Description of the delete group)

BOM_SUB_COMPS_INTERFACE
This table temporarily stores information about the substitute components associated with a bill of material component. This table is shared with bills of material and engineering change order open interfaces. The engineering change order open interface will be available at a future date.
You can only import data into the BOM_SUB_COMPS_INTERFACE table for standard components assigned to standard, model, and option class bills of material.

The required fields for creating substitute components using the BOM_SUB_COMPS_INTERFACE are:
PROCESS_FLAG
SUBSTITUTE_COMPONENT_ID
SUBSTITUTE_ITEM_QUANTITY
COMPONENT_SEQUENCE_ID
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'create' for creating a substitute.
The required fields for updating substitute components using the BOM_SUB_COMPS_INTERFACE are:
PROCESS_FLAG
COMPONENT_SEQUENCE_ID
SUBSTITUTE_COMP_NUMBER or SUBSTITUTE_COMPONENT_ID
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'update'
The required fields for deleting substitute components using the BOM_SUB_COMPS_INTERFACE are:
PROCESS_FLAG
COMPONENT_SEQUENCE_ID
SUBSTITUTE_COMP_NUMBER or SUBSTITUTE_COMPONENT_ID
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'delete'.
You cannot delete an unimplemented record.

BOM_OP_ROUTING_INTERFACE
This table temporarily stores information about manufacturing and engineering routings.
If you are creating an alternate routing you must also enter a value in the ALTERNATE_ROUTING_DESIGNATOR column.
If you enter PROCESS_REVISION, Oracle Bill of Material will insert a record into MTL_RTG_ITEM_REVISIONS.
If the routing you import references a common routing you must enter a value in the COMMON_ASSEMBLY_ITEM_ID or the COMMON_ROUTING_SEQUENCE_ID columns. Routing can only reference common routings that belong to the same organization. If the routing does not reference a common routing, the Bill and Routing interface program defaults the value of the ROUTING_SEQUENCE_ID for the COMMON_ROUTING_SEQUENCE_ID.

The required fields for creating routings using the BOM_OP_ROUTING_INTERFACE are:
PROCESS_FLAG
ASSEMBLY_ITEM_ID
ORGANIZATION_ID
ROUTING_TYPE
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'insert'.
The ROUTING_TYPE is 1 for manufacturing and 2 for engineering.
You can specify in the ROUTING_TYPE column whether the routing is a manufacturing routing or an engineering routing. If you do not include a value for this column, it is defaulted to a 1 for manufacturing.

The required fields for updating routings using the BOM_OP_ROUTING_INTERFACE are:
PROCESS_FLAG
ROUTING_SEQUENCE_ID
or
ASSEMBLY_ITEM_ID
ORGANIZATION_ID
ALTERNATE_ROUTING_DESIGNATOR
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'update'
The Bill and Routing Interface program does not derive or default data when updating a routing.

The required fields for deleting routings using the BOM_OP_ROUTING_INTERFACE are:
PROCESS_FLAG
ROUTING_SEQUENCE_ID
or
ASSEMBLY_ITEM_ID
ORGANIZATION_ID
ALTERNATE_ROUTING_DESIGNATOR
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'delete'
The Bill and Routing Interface program does not derive or default data when deleting a routing.
The TRANSACTION_TYPE needs to be 'delete'.

BOM_OP_SEQUENCES_INTERFACE
This table temporarily stores information about routing operations. You may define multiple operations for a routing. You must specify the department in which every operation will occur.
You cannot have overlapping effective dates for the same operation.
You can enter three resources and three instructions for each operation sequence. Oracle Bills of Material will insert these records into the tables, BOM_OPERATION_RESOURCES and BOM_OPERATION_INSTRUCTIONS, respectively.
You must specify a value in the ALTERNATE_ROUTING_DESIGNATOR column if you assign operations to an alternate routing and have not entered a value for the ROUTING_SEQUENCE_ID column.
To assign standard operations, you must have previously defined them in the Define Standard Operations form in Oracle Bills of Material. Resources and attachments are also defaulted if you insert a value in the STANDARD_OPERATION_ID column. Resources must also be predefined in Oracle Bills of Material.

The fields required for creating an operation using the BOM_OP_SEQUENCES_INTERFACE are:
PROCESS_FLAG
ROUTING_SEQUENCE_ID
OPERATION_SEQ_NUM
DEPARTMENT_ID
EFFECTIVITY_DATE
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'insert'.

The fields required for updating an operation using the BOM_OP_SEQUENCES_INTERFACE are:
OPERATION_SEQUENCE_ID
or
ROUTING_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE, OPERATION_TYPE
or
ASSEMBLY_ITEM_ID or ASSEMBLY_ITEM_NUMBER,
ALTERNATE_ROUTING_DESIGNATOR,
ORGANIZATION_ID or ORGANIZATION_CODE,
OPERATION_SEQ_NUM, EFFECTIVITY_DATE, OPERATION_TYPE
You also need to enter:
PROCESS_FLAG
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'update'.
To update the OPERATION_SEQ_NUM or EFFECTIVITY_DATE, you must enter a value in the NEW_OP_SEQ_NUM and NEW_EFFECTIVITY_DATE columns.

The fields required for deleting an operation using the BOM_OP_SEQUENCES_INTERFACE are:
OPERATION_SEQUENCE_ID
or
ROUTING_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE, OPERATION_TYPE
or
ASSEMBLY_ITEM_ID or ASSEMBLY_ITEM_NUMBER,
ALTERNATE_ROUTING_DESIGNATOR,
ORGANIZATION_ID or ORGANIZATION_CODE,
OPERATION_SEQ_NUM, EFFECTIVITY_DATE, OPERATION_TYPE
You also need to enter:
PROCESS_FLAG
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'delete'.
Once the operation is identified, the entire record will be placed in a delete group. There is no optional data.

BOM_OP_RESOURCES_INTERFACE
This table temporarily stores information about resources that you require to complete operations on routings. You may assign multiple resources or assign the same resource multiple times at any operation.
You must specify a value in ALTERNATE_ROUTING_DESIGNATOR column if you assign resources to an alternate routing and have not entered a value for the ROUTING_SEQUENCE_ID or the OPERATION_SEQUENCE_ID column.

NOTE: The resource must be set up and assigned to a department in Oracle Bill of Materials first, before you can import the resources.

The required fields to create a resource using the BOM_OP_RESOURCES_INTERFACE are:
PROCESS_FLAG
RESOURCE_SEQ_NUM
RESOURCE_ID
OPERATION_SEQUENCE_ID
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'insert'.
The required fields to update a resource using the BOM_OP_RESOURCES_INTERFACE are one of the following:
OPERATION_SEQUENCE_ID, RESOURCE_SEQ_NUM
or
ROUTING_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE, RESOURCE_SEQ_NUM
or
ASSEMBLY_ITEM_ID or ASSEMBLY_ITEM_NUMBER,
ALTERNATE_ROUTING_DESIGNATOR,
ORGANIZATION_ID or ORGANIZATION_CODE,
OPERATION_SEQ_NUM, EFFECTIVITY_DATE, RESOURCE_SEQ_NUM
You also need to enter:
PROCESS_FLAG
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'update'.

To update the RESOURCE_SEQ_NUM you must enter a value in the NEW_RESOURCE_SEQ_NUM column. The RESOURCE_SEQ_NUM column is used to determine which record will be updated.
The fields required for deleting a resource using the BOM_OP_RESOURCES_INTERFACE are one of the following:
OPERATION_SEQUENCE_ID, RESOURCE_SEQ_NUM
or
ROUTING_SEQUENCE_ID, OPERATION_SEQ_NUM, EFFECTIVITY_DATE, RESOURCE_SEQ_NUM
or
ASSEMBLY_ITEM_ID or ASSEMBLY_ITEM_NUMBER,
ALTERNATE_ROUTING_DESIGNATOR,
ORGANIZATION_ID or ORGANIZATION_CODE,
OPERATION_SEQ_NUM, EFFECTIVITY_DATE, RESOURCE_SEQ_NUM
You also need to enter:
PROCESS_FLAG
TRANSACTION_TYPE
The PROCESS_FLAG needs to be 1 for pending.
The TRANSACTION_TYPE needs to be 'delete'.
The Bill and Routing Interface program does not derive or default data when deleting a routing.

SQL SCRIPTS
The INVENTORY_ITEM_ID in the MTL_SYSTEM_ITEMS table is system generated. It is the same number as the ASSEMBLY_ITEM_ID in the BOM_BILL_OF_MTLS_INTERFACE the COMPONENT_ITEM_ID in the BOM_INVENTORY_COMPS_INTERFACE table and the SUBSTITUTE_COMPONENT_ID in the BOM_SUB_COMPS_INTERFACE.

The ASSEMBLY_ITEM_ID in the BOM_BILL_OF_MTLS_INTERFACE table is the same number as the
ASSEMBLY_ITEM_ID in the BOM_INVENTORY_COMPS_INTERFACE, the BOM_OP_RESOURCES_INTERFACE, the BOM_OP_SEQUENCES_INTERFACE, and the BOM_OP_ROUTINGS_INTERFACE tables.

The BILL_SEQUENCE_ID in the BOM_BILL_OF_MTLS_INTERFACE table is system generated. It is the same number as the BILL_SEQUENCE_ID in the BOM_INVENTORY_COMPS_INTERFACE table.
The COMPONENT_SEQUENCE_ID in the BOM_INVENTORY_COMPS table is system generated.
The ROUTING_SEQUENCE_ID in the BOM_OP_ROUTINGS_INTERFACE table is the same in the BOM_OP_RESOURCES_INTERFACE and the BOM_OP_SEQUENCES_INTERFACE tables.
The OPERATION_SEQUENCE_ID in the BOM_OP_SEQUENCES_INTERFACE table is the same in the BOM_OP_RESOURCES_INTERFACE table.
If you enter the ORGANIZATION_CODE, Oracle Bills of Materials will fill in the corresponding ORGANIZATION_ID.
If you enter the ITEM_NUMBER, Oracle Bills of Materials will fill in the corresponding ASSEMBLY_ITEM_ID.
If you enter the LOCATION_NAME , Oracle Bills of Materials will fill in the corresponding SUPPLY_LOCATOR_ID
If you enter the ASSEMBLY_ITEM_NUMBER, Oracle Bills of Materials will fill in the corresponding ASSEMBLY_ITEM_ID.
If you enter the SUBSTITUTE_COMP_NUMBER , Oracle Bills of Materials will fill in the corresponding SUBSTITUTE_COMP_ID.
If you enter the COMPONENT_ITEM_NUMBER, Oracle Bills of Materials will fill in the corresponding COMPONENT_ITEM_ID.
You can enter the BILL_SEQUENCE_ID, COMPONENT_ITEM_ID, OPERATION_SEQ_NUM, and EFFECTIVITY_DATE instead of COMPONENT_SEQUENCE_ID. The open interfaces will fill in the corresponding COMPONENT_SEQUENCE_ID.
You can enter ASSEMBLY_ITEM_ID, ORGANIZATION_ID, and ALTERNATE_BOM_DESIGNATOR instead of BILL_SEQUENCE_ID. The open interfaces will fill in the corresponding BILL_SEQUENCE_ID.
You can enter ASSEMBLY_ITEM_ID, ORGANIZATION_ID, AND ALTERNATE_ROUTING_DESIGNATOR instead of ROUTING_SEQUENCE_ID. Oracle Bills of Material will fill in the corresponding ROUTING_SEQUENCE_ID.
You can enter ROUTING_SEQUENCE_ID, OPERATION_SEQ_NUM, and EFFECTIVITY_DATE instead of OPERATION_SEQUENCE_ID. Oracle Bills of Materials will fill in the corresponding OPERATION_SEQUENCE_ID.

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE ALTERNATE_BOM_DESIGNATOR
select alternate_bom_designator
from bom_bill_of_materials
where assembly_item_id = &inv_item_id
and organization_id = &organization_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE ASSEMBLY_ITEM_ID (INVENTORY_ITEM_ID) OF AN ITEM
select organization_id, inventory_item_id, segment1
from mtl_system_items
where segment1 = 'xxxx'; (xxxx = name of item)

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE BILL_SEQUENCE_ID
select bill_sequence_id, assembly_item_id
from bom_bill_of_materials
where assembly_item_id = &inv_item_id
and organization_id = &orgid ;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO LOOK AT BOM COMPONENT INFO
select component_sequence_id, bill_sequence_id, component_quantity
from bom_inventory_components
where bill_sequence_id = &bill_sequence_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO CHECK ITEMS IN BOM COMPONENTS INTERFACE TABLE
select operation_seq_num, component_item_id, component_quantity,
bill_sequence_id, effectivity_date, process_flag
from bom_inventory_comps_interface;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO LOOK AT BOM HEADER INFO
select assembly_item_id, organization_id, alternate_bom_designator,
assembly_type, bill_sequence_id
from bom_bill_of _materials
where assembly_item_id = &assembly_item_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO LOOK AT BOM SUBSTITUE COMPONENT ID, QUANTITY, AND OTHER INFORMATION
select substitute_component_id, substitute_item_quantity,
component_sequence_id, acd_type
from bom_substitute_components
where component_sequence_id = &component_sequence_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO CHECK ITEMS IN THE BOM_SUB_COMPS_INTERFACE TABLE
select substitute_component_id, substitute_item_quantity,
component_sequence_id, process_flag
from bom_sub_comps_interface;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE COMPONENT_ITEM_ID (INVENTORY_ITEM_ID) OF AN ITEM
select organization_id, inventory_item_id, segment1
from mtl_system_items
where segment1 = 'xxxx'; (xxxx = name of item)

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE COMPONENT_ITEM_SEQUENCE_ID
select component_item_id, bill_sequence_id, component_sequence_id
from bom_inventory_components
where bill_sequence_id = &bill_sequence_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE COMPONENT_SEQUENCE_ID OF AN ITEM
select i.compontent_sequence_id, i.bill_sequence_id, b.assembly_item_id
from bom_inventory_components i, bom_bills of materials b
where b.assembly_item_id = &assembly_item_id
and i.bill_sequence_id = b.bill_sequence_id
and b.organization_id = &orgid ;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE DEPARTMENT ID
select department_id, organization_id, department_code
from bom_departments
where department_code = &department_code;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE EFFECTIVITY_DATE OF A COMPONENT
select i.effectivity_date,
b.bill_sequence_id, b.assembly_item_id
from bom_inventory_components i, bom_bills of materials b
where b.assembly_item_id = &assembly_item_id
and i.bill_sequence_id = b.bill_sequence_id
and b.organization_id = &orgid ;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND ERROR MESSAGES IN THE MTL_INTERFACE_ERRORS TABLE
select table_name, column_name, organization_id, message_name, error_message
from mtl_interface_errors
where request_id = &request_id;
or
select table_name, column_name, organization_id, message_name, error_message
from mtl_interface_errors
where transaction_id = &transaction_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO GET OPERATION RESOURCE DATA
select operation_sequence_id, resource_seq_num, resource_id, usage_rate_or_amount
from bom_operation_resources
where operation_sequence_id = &operation_sequence_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO GET OPERATION SEQUENCE DATA
select *
from bom_operation_sequences
where operation_sequence_id = &operation_sequence_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE OPERATION SEQUENCE ID
select operation_sequence_id, routing_sequence_id, operation_seq_num, department_id
from bom_operation_sequences
where routing_sequence_id = &routing_sequence_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE OPERATION_SEQ_NUM OF A COMPONET
select i.operation_seq_num,
b.bill_sequence_id, b.assembly_item_id
from bom_inventory_components i, bom_bills of materials b
where b.assembly_item_id = &assembly_item_id
and i.bill_sequence_id = b.bill_sequence_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE ORGANIZATION ID AND ORGANIZATION CODE
select organization_id, organization_name, organization_code
from org_organization_definitions;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND THE RESOURCE ID
select resource_id, resource_code, organization_id
from bom_resources
where resource_code = &resource_code;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO GET ROUTING OPERATION INFO
select operation_sequence_id, routing_sequence_id, operation_seq_num, department_id
from bom_operation_sequences
where routing_sequence_id = &routing_sequence_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO FIND ROUTING SEQUENCE ID
select routing_sequence_id, assembly_item_id, organization_id
from bom_operational_routings
where assembly_item_id = &assembly_item_id;

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO INSERT A RECORD INTO THE BOM_BILL_OF_MTLS_INTERFACE
insert into bom_ bill_of_mtls_interface
(assembly_item_id, organization_id, assembly_type, process_flag, transaction_type)
values (aaaa, bbbb, cccc, dddd, eeee);
commit;
* aaaa = the assembly id (inventory_item_id) of the item you want to set up a BOM for.
* bbbb = the organization id you want the BOM in.
* cccc = the assembly type of the BOM; 1 = manufacturing, 2 = engineering.
* dddd = the process flag must = 1 to be picked up by the import.
* eeee = 'create' to enter a new bom

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO INSERT A RECORD INTO THE BOM_INVENTORY_COMPS_INTERFACE
insert into bom_inventory_comps_interface
(component_item_id, process_flag, operation_seq_num, bill_sequence_id, transaction_type,
effectivity_date)
values (aaaa, bbbb, cccc, dddd, eeee, ffff );
commit;
* aaaa = the component id (inventory_item_id) of the item you want to add to a BOM.
* bbbb = the process flag must = 1 to be picked up by the import.
* cccc = the operation sequence number you want the component added to.
* dddd = the bill sequence id of the BOM you want to add the component to.
* eeee = 'create' to add a new component.
* ffff = date component is effective. You can enter sysdate.
Note: operation_seq_num must be set to 1 if no routing has been defined.

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO INSERT A RECORD INTO THE BOM_SUB_COMPS_INTERFACE
insert into bom_sub_comps_interface
(process_flag, substitute_component_id, substitute_item_quantity, component_sequence_id,
transaction_type)
values ( aaaa, bbbb, cccc, dddd, eeee);
commit;
*aaaa =. the process flag must = 1 to be picked up by the import.
*bbbb = the substitue_component_id from the bom_substitute_components table for the item you want to
use.
*cccc = the quantity for the substitute item.
*dddd = the component sequence id for the item that is being substituted.
*eeee = 'insert' to create a new substitute component.

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO INSERT A RECORD INTO THE BOM_OP_ROUTINGS_INTERFACE
insert into bom_op_routings_interface
(process_flag, assembly_item_id, organization_id, routing_type, transaction_type)
values (aaaa, bbbb, cccc, dddd, eeee);
commit;
* aaaa =. the process flag must = 1 to be picked up by the import.
* bbbb = the assembly id (inventory_item_id) of the item you want to set up a routing for.
* cccc = id of the organization you wish to set up the routing in.
* dddd = manufacturing = 1; engineering = 2.
* eeee = 'insert' to add a new component.

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO INSERT A RECORD INTO THE BOM_OP_SEQUENCES_INTERFACE
insert into bom_op_sequences_interface
(process_flag, routing_sequence_id, operation_seq_num, department_id, effectivity_date,
transaction_type)
values ( aaaa, bbbb, cccc, dddd, eeee, ffff );
commit;
*aaaa =. the process flag must = 1 to be picked up by the import.
*bbbb = the routing_sequence_id from bom_operational_routings.
*cccc = the operation sequence number you want.
*dddd = the department_id from bom_departments
*eeee = the date you want the operation effective, you can use sysdate here.
*ffff = 'insert' to create a new op sequence.
NOTE: The department must be set up in Oracle Bill of Materials before you can import the op sequence.

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO INSERT A RECORD INTO THE BOM_OP_RESOURCES_INTERFACE
insert into bom_op_resources_interface
(process_flag, resource_seq_num, resource_id, operation_sequence_id,
transaction_type)
values ( aaaa, bbbb, cccc, dddd, eeee);
commit;
*aaaa =. the process flag must = 1 to be picked up by the import.
*bbbb = the resource sequence number you want to use.
*cccc = the resource_id from bom_resources.
*dddd = the operation_sequence_id from bom_operation_sequences that you wish to attach the
resource to.
*eeee = 'insert' to create a new op sequence.
NOTE: The resource must be set up and assigned to a department in Oracle Bill of Materials first, before
you can import the resources.

--> :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
TO INSERT RECORDS INTO THE BOM_BILL_OF_MTLS_INTERFACE, BOM_INVENTORY_COMPS_INTERFACE, BOM_OP_ROUTING_INTERFACE, BOM_OP_SEQUENCES_INTERFACE, and BOM_OP_RESOURCES_INTERFACE SO THAT THEY CAN BE IMPORTED ALL AT THE SAME TIME
Insert in bom_bill_of_mtls_interface
(assembly_item_id, organization_id, assembly_type,
process_flag, transaction_type)
values (&assembly_item_id,
&organization_id,
&assembly_type,
1,'create');
commit;
insert into bom_inventory_comps_interface
(assembly_item_id, component_item_id, process_flag,
operation_seq_nem, transaction_type, effectivity_date,
organization_id)
values (&assembly_item_id,
&component_item_id,
1,1,'create',
&effectivity_date,
&organization_id);
commit;

NOTE: THE ASSEMBLY_ITEM_ID IS THE ID OF THE ASSEMBLY THE COMPONENT IS BEING ATTACHED TO. THE COMPONENT_ITEM_ID IS THE ID OF THE COMPONENT BEING ATTACHED TO THE BILL.
NOTE: THE OPERATION_SEQ_NUM MUST BE 1 IF NO ROUTING HAS BEEN DEFINED.

insert into bom_op_routing_interface
(process_flag, assembly_item_id, organization_id,
routing_type, transaction_type)
values (1,&inventory_item_id, &organization_id,1,'insert');
commit;
insert into bom_op_sequences_interface
(process_flag, assembly_item_id, organization_id,
operation_seq_num, department_id, effectivity_date,
transaction_type)
values (1, &assembly_item_id, &organization_id,
&operation_seq_num, &department_id, &effectivity_date, 'insert');
commit;
insert into bom_op_resources_interface
(process_flag, resource_seq_num, resource_id,
assembly_item_id, organization_id, operation_seq_num,
effectivity_date, transaction_type)
values (1,&resource_seq_num, &resource_id,
&assembly_item_id, &organization_id, &operation_seq_num,
&effectivity_date, 'insert');
commit;



2 comments:

Kiran said...

Thanks

Anonymous said...

Sir, How to load Operation Alternate Resource in Routing, can you please suggest any API or Interface program we can use for Conversion purpose.

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect