The following lines contain the word 'select', 'insert', 'update' or 'delete':
* Procedure : Translate_And_Insert_Messages
* Returns : None
* Parameters IN : Message Token Table
* Error Level
* The entity level at which the error has
* occured.This is same as entity id in the
* other procedures (Add_Message, Add_Error_Message)
* For explanation on entity id, entity index,
* message type,row identifier, table name,
* entity code parameters please refer to
* Add_Error_Message API
* Parameters OUT: Non
* Purpose : This procedure will read through the message token
* table and insert them into the message table with
* the proper business object context.
**********************************************************************/
PROCEDURE Translate_And_Insert_Messages
( p_mesg_token_tbl IN Error_Handler.Mesg_Token_Tbl_Type
, p_error_level IN NUMBER := NULL
, p_entity_index IN NUMBER := NULL
, p_application_id IN VARCHAR2 := 'ENG'
, p_row_identifier IN NUMBER := NULL
, p_table_name IN VARCHAR2 := NULL
, p_entity_code IN VARCHAR2 := NULL
) IS
Begin
Translate_And_Insert_Messages
( p_mesg_token_tbl
, p_error_level
, p_entity_index
, p_application_id
, p_row_identifier
, p_table_name
, p_entity_code
, Bom_Bo_Pub.G_MISS_BOM_HEADER_REC
, Bom_Bo_Pub.G_MISS_BOM_REVISION_TBL
, Bom_Bo_Pub.G_MISS_BOM_COMPONENT_TBL
, Bom_Bo_Pub.G_MISS_BOM_REF_DESIGNATOR_TBL
, Bom_Bo_Pub.G_MISS_BOM_SUB_COMPONENT_TBL
, Bom_Bo_Pub.G_MISS_BOM_COMP_OPS_TBL
);
PROCEDURE Translate_And_Insert_Messages
( p_mesg_token_tbl IN Error_Handler.Mesg_Token_Tbl_Type
, p_error_level IN NUMBER := NULL
, p_entity_index IN NUMBER := NULL
, p_application_id IN VARCHAR2 := 'ENG'
, p_row_identifier IN NUMBER := NULL
, p_table_name IN VARCHAR2 := NULL
, p_entity_code IN VARCHAR2 := NULL
, p_bom_header_rec IN OUT NOCOPY Bom_Bo_Pub.Bom_Head_Rec_Type
, p_bom_revision_tbl IN OUT NOCOPY Bom_Bo_Pub.Bom_Revision_Tbl_Type
, p_bom_component_tbl IN OUT NOCOPY Bom_Bo_Pub.Bom_Comps_Tbl_Type
, p_bom_ref_Designator_tbl IN OUT NOCOPY Bom_Bo_Pub.Bom_Ref_Designator_Tbl_Type
, p_bom_sub_component_tbl IN OUT NOCOPY Bom_Bo_Pub.Bom_Sub_Component_Tbl_Type
, p_bom_comp_ops_tbl IN OUT NOCOPY Bom_Bo_Pub.Bom_Comp_Ops_Tbl_Type
)
IS
l_message_text VARCHAR2(2000);
END Translate_And_Insert_Messages;
Error_Handler.Translate_And_Insert_Messages
( p_mesg_token_Tbl => p_mesg_token_tbl
, p_error_level => p_error_level
, p_entity_index => p_entity_index
, p_bom_header_rec =>x_bom_header_rec
, p_bom_revision_tbl =>x_bom_revision_tbl
, p_bom_component_tbl =>x_bom_component_tbl
, p_bom_ref_Designator_tbl =>x_bom_ref_Designator_tbl
, p_bom_sub_component_tbl =>x_bom_sub_component_tbl
, p_bom_comp_ops_tbl =>g_bom_comp_ops_tbl
);
G_Error_Table.DELETE;
* Procedure : Delete_Message
* Parameters IN : Entity Id
* Entity Index
* Purpose : This procedure will delete a message for an entity
* record.
**********************************************************************/
PROCEDURE Delete_Message
( p_entity_id IN VARCHAR2
, p_entity_index IN NUMBER
)
IS
l_idx NUMBER;
G_Error_Table.Delete(l_idx);
END Delete_Message;
* Procedure : Delete_Message
* Parameters IN : Entity Id
* Purpose : This procedure will delete all messages for an entity
**********************************************************************/
PROCEDURE Delete_Message
( p_entity_id IN VARCHAR2 )
IS
l_idx NUMBER;
G_Error_Table.Delete(l_idx);
END Delete_Message;
select value
INTO l_utl_file_dir
FROM v$parameter
WHERE name = 'utl_file_dir';
select value
INTO l_utl_file_dir
FROM v$parameter
WHERE name = 'utl_file_dir';
INSERT INTO mtl_interface_errors
( organization_id
, unique_id
, last_update_date
, last_updated_by
, creation_date
, created_by
, last_update_login
, table_name
, message_name
, column_name
, request_id
, program_application_id
, program_id
, program_update_date
, error_message
, transaction_id
, entity_identifier
, bo_identifier)
VALUES
( G_Error_Table(l_idx).organization_id
, mtl_system_items_interface_s.NEXTVAL
, sysdate
, l_user_id
, sysdate
, l_user_id
, l_login_id
, G_Error_Table(l_idx).table_name
, G_Error_Table(l_idx).message_name
, null
, l_request_id
, l_program_appl_id
, l_program_id
, l_program_upd_date
, G_Error_Table(l_idx).message_text
, G_Error_Table(l_idx).row_identifier
, G_Error_Table(l_idx).entity_id
, G_Error_Table(l_idx).bo_identifier);
/* Fix for bug 4661753 - Insert message_name from G_Error_Table into mtl_interface_errors above.
Populate unique_id using mtl_system_items_interface_s sequence. */
END LOOP;