The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT inventory_item_id
, organization_id
, process_revision
-- , implementation_date
, effectivity_date
, attribute_category
, attribute1
, attribute2
, attribute3
, attribute4
, attribute5
, attribute6
, attribute7
, attribute8
, attribute9
, attribute10
, attribute11
, attribute12
, attribute13
, attribute14
, attribute15
INTO l_rtg_rev_unexp_rec.assembly_item_id
, l_rtg_rev_unexp_rec.organization_id
, l_rtg_revision_rec.revision
, l_rtg_revision_rec.start_effective_date
, l_rtg_revision_rec.attribute_category
, l_rtg_revision_rec.attribute1
, l_rtg_revision_rec.attribute2
, l_rtg_revision_rec.attribute3
, l_rtg_revision_rec.attribute4
, l_rtg_revision_rec.attribute5
, l_rtg_revision_rec.attribute6
, l_rtg_revision_rec.attribute7
, l_rtg_revision_rec.attribute8
, l_rtg_revision_rec.attribute9
, l_rtg_revision_rec.attribute10
, l_rtg_revision_rec.attribute11
, l_rtg_revision_rec.attribute12
, l_rtg_revision_rec.attribute13
, l_rtg_revision_rec.attribute14
, l_rtg_revision_rec.attribute15
FROM mtl_rtg_item_revisions
WHERE inventory_item_id = p_assembly_item_id
AND organization_id = p_organization_id
AND process_revision = p_revision;
* Procedure : Insert_Row
* Parameters IN : rtg Revisioner exposed column record
* rtg Revisioner unexposed column record
* Parameters out: Message Token Table
* Return Status
* Purpose : Procedure will perfrom an insert into the
* rtg_Bill_Of_Materials table thus creating a new bill
*********************************************************************/
PROCEDURE Insert_Row
( p_rtg_revision_rec IN Bom_Rtg_Pub.rtg_revision_Rec_Type
, p_rtg_rev_unexp_rec IN Bom_Rtg_Pub.rtg_rev_Unexposed_Rec_Type
, x_mesg_token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
, x_return_Status IN OUT NOCOPY VARCHAR2
)
IS
l_start_effectivity_date DATE;
INSERT INTO mtl_rtg_item_revisions
( inventory_item_id
, organization_id
, process_revision
, implementation_date
, effectivity_date
, attribute_category
, attribute1
, attribute2
, attribute3
, attribute4
, attribute5
, attribute6
, attribute7
, attribute8
, attribute9
, attribute10
, attribute11
, attribute12
, attribute13
, attribute14
, attribute15
, creation_date
, created_by
, last_update_date
, last_updated_by
, last_update_login
, request_id
, program_id
, program_application_id
, program_update_date
)
VALUES
( p_rtg_rev_unexp_rec.assembly_item_id
, p_rtg_rev_unexp_rec.organization_id
, p_rtg_revision_rec.revision
, l_start_effectivity_date
, l_start_effectivity_date
, p_rtg_revision_rec.attribute_category
, p_rtg_revision_rec.attribute1
, p_rtg_revision_rec.attribute2
, p_rtg_revision_rec.attribute3
, p_rtg_revision_rec.attribute4
, p_rtg_revision_rec.attribute5
, p_rtg_revision_rec.attribute6
, p_rtg_revision_rec.attribute7
, p_rtg_revision_rec.attribute8
, p_rtg_revision_rec.attribute9
, p_rtg_revision_rec.attribute10
, p_rtg_revision_rec.attribute11
, p_rtg_revision_rec.attribute12
, p_rtg_revision_rec.attribute13
, p_rtg_revision_rec.attribute14
, p_rtg_revision_rec.attribute15
, SYSDATE
, BOM_Rtg_Globals.Get_User_Id
, SYSDATE
, BOM_Rtg_Globals.Get_User_Id
, BOM_Rtg_Globals.Get_User_Id
, Fnd_Global.Conc_Request_Id
, Fnd_Global.Conc_Program_Id
, Fnd_Global.Prog_Appl_Id
, SYSDATE
);
' :Inserting Record ' ||
SQLERRM
, x_mesg_token_Tbl => x_mesg_token_tbl
);
END Insert_Row;
* Procedure : Update_Row
* Parameters IN : RTG Revisioner exposed column record
* RTG Revisioner unexposed column record
* Parameters out: Message Token Table
* Return Status
* Purpose : Procedure will perfrom an Update into the
* rtg_Bill_Of_Materials table.
********************************************************************/
PROCEDURE Update_Row
( p_RTG_revision_rec IN Bom_Rtg_Pub.RTG_Revision_Rec_Type
, p_RTG_rev_unexp_rec IN Bom_Rtg_Pub.RTG_Rev_Unexposed_Rec_Type
, x_mesg_token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
, x_return_Status IN OUT NOCOPY VARCHAR2
)
IS
p_start_effective_date DATE;
UPDATE mtl_rtg_item_revisions
SET effectivity_date =
p_rtg_revision_rec.start_effective_date
, implementation_date =
p_rtg_revision_rec.start_effective_date
, last_update_date = SYSDATE
, last_updated_by = BOM_Rtg_Globals.Get_User_Id
, last_update_login = BOM_Rtg_Globals.Get_User_Id
, attribute_category =p_rtg_revision_rec.attribute_category , attribute1 = p_rtg_revision_rec.attribute1
, attribute2 = p_rtg_revision_rec.attribute2
, attribute3 = p_rtg_revision_rec.attribute3
, attribute4 = p_rtg_revision_rec.attribute4
, attribute5 = p_rtg_revision_rec.attribute5
, attribute6 = p_rtg_revision_rec.attribute6
, attribute7 = p_rtg_revision_rec.attribute7
, attribute8 = p_rtg_revision_rec.attribute8
, attribute9 = p_rtg_revision_rec.attribute9
, attribute10= p_rtg_revision_rec.attribute10
, attribute11= p_rtg_revision_rec.attribute11
, attribute12= p_rtg_revision_rec.attribute12
, attribute13= p_rtg_revision_rec.attribute13
, attribute14= p_rtg_revision_rec.attribute14
, attribute15= p_rtg_revision_rec.attribute15
, request_id = Fnd_Global.Conc_Request_Id
, program_id = Fnd_Global.Conc_Program_Id
, program_application_id = Fnd_Global.Prog_Appl_Id
, program_update_date = SYSDATE
WHERE inventory_item_id = p_rtg_rev_unexp_rec.assembly_item_id AND organization_id = p_rtg_rev_unexp_rec.organization_id
AND process_revision = p_rtg_revision_rec.revision;
END Update_Row;
* Procedure : Delete_Row
* Parameters IN : rtg Revisioner exposed column record
* rtg Revisioner unexposed column record
* Parameters out: Message Token Table
* Return Status
* Purpose : Procedure will perfrom an Delete from the
* rtg_Bill_Of_Materials by creating a delete Group.
*********************************************************************/
PROCEDURE Delete_Row
( p_rtg_revision_rec IN Bom_Rtg_Pub.rtg_revision_Rec_Type
, p_rtg_rev_unexp_rec IN Bom_Rtg_Pub.rtg_rev_Unexposed_Rec_Type
, x_mesg_token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
, x_return_Status IN OUT NOCOPY VARCHAR2
)
IS
l_rtg_rev_unexp_rec Bom_Rtg_Pub.rtg_rev_Unexposed_Rec_Type
:= p_rtg_rev_unexp_rec;
Error_Handler.Write_Debug('Delete routing revision '
|| p_rtg_revision_rec.revision);
DELETE FROM mtl_rtg_item_revisions
WHERE inventory_item_id = p_rtg_rev_unexp_rec.assembly_item_id
AND organization_id = p_rtg_rev_unexp_rec.organization_id
AND process_revision = p_rtg_revision_rec.revision;
, p_Message_Text => 'ERROR in Delete Routing Revision' ||
substr(SQLERRM, 1, 100) || ' ' ||
to_char(SQLCODE)
, p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
, x_Mesg_Token_Tbl => x_Mesg_Token_Tbl
);
END Delete_Row;
Insert_Row
( p_rtg_revision_rec => p_rtg_revision_rec
, p_rtg_rev_unexp_rec => p_rtg_rev_unexp_rec
, x_mesg_token_Tbl => l_mesg_token_tbl
, x_return_Status => l_return_status
);
BOM_Rtg_Globals.G_OPR_UPDATE THEN
Update_Row
( p_rtg_revision_rec => p_rtg_revision_rec
, p_rtg_rev_unexp_rec => p_rtg_rev_unexp_rec
, x_mesg_token_Tbl => l_mesg_token_tbl
, x_return_Status => l_return_status
);
BOM_Rtg_Globals.G_OPR_DELETE THEN
Delete_Row
( p_rtg_revision_rec => p_rtg_revision_rec
, p_rtg_rev_unexp_rec => p_rtg_rev_unexp_rec
, x_mesg_token_Tbl => l_mesg_token_tbl
, x_return_Status => l_return_status
);