The following lines contain the word 'select', 'insert', 'update' or 'delete':
IF l_sub_component_rec.last_update_date = FND_API.G_MISS_DATE THEN
l_sub_component_rec.last_update_date := NULL;
IF l_sub_component_rec.last_updated_by = FND_API.G_MISS_NUM THEN
l_sub_component_rec.last_updated_by := NULL;
IF l_sub_component_rec.last_update_login = FND_API.G_MISS_NUM THEN
l_sub_component_rec.last_update_login := NULL;
IF l_sub_component_rec.program_update_date = FND_API.G_MISS_DATE THEN
l_sub_component_rec.program_update_date := NULL;
* Procedure : Update_Row
* Parameter IN : Substitute Component Record
* Sub. Comps Unexposed Cols. Record
* Parameter OUT : Return_Status - indicating success or failure
* Mesg_Token_Tbl - Filled with Errors or warnings
* Purpose : Update Row procedure will update the production rec
* to the new values as entered in the user record.
* Any errors are filled in the Mesg_Token_Tbl.
*
********************************************************************/
PROCEDURE Update_Row
( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
, p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
, x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
, x_return_status OUT NOCOPY VARCHAR2
)
IS
l_processed BOOLEAN;
dbms_output.put_line('Within Update Row . . .');
UPDATE BOM_SUBSTITUTE_COMPONENTS
SET SUBSTITUTE_ITEM_QUANTITY =
p_sub_component_rec.substitute_item_quantity
, ATTRIBUTE_CATEGORY = p_sub_component_rec.attribute_category
, ATTRIBUTE1 = p_sub_component_rec.attribute1
, ATTRIBUTE2 = p_sub_component_rec.attribute2
, ATTRIBUTE3 = p_sub_component_rec.attribute3
, ATTRIBUTE4 = p_sub_component_rec.attribute4
, ATTRIBUTE5 = p_sub_component_rec.attribute5
, ATTRIBUTE6 = p_sub_component_rec.attribute6
, ATTRIBUTE7 = p_sub_component_rec.attribute7
, ATTRIBUTE8 = p_sub_component_rec.attribute8
, ATTRIBUTE9 = p_sub_component_rec.attribute9
, ATTRIBUTE10 = p_sub_component_rec.attribute10
, ATTRIBUTE11 = p_sub_component_rec.attribute11
, ATTRIBUTE12 = p_sub_component_rec.attribute12
, ATTRIBUTE13 = p_sub_component_rec.attribute13
, ATTRIBUTE14 = p_sub_component_rec.attribute14
, ATTRIBUTE15 = p_sub_component_rec.attribute15
, Original_system_Reference =
p_sub_component_rec.original_system_reference
WHERE SUBSTITUTE_COMPONENT_ID =
p_sub_comp_Unexp_rec.substitute_component_id
AND COMPONENT_SEQUENCE_ID = p_sub_comp_Unexp_rec.component_sequence_id
AND ACD_TYPE = p_sub_component_rec.acd_type
;
dbms_output.put_line('Update Row successful . . . ');
( p_Message_name => 'ENG_NOT_UPDATE_ROW'
, p_Mesg_Token_Tbl => l_Mesg_Token_Tbl
, x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
);
'Utility (SubStitute Component Update)' ||
SUBSTR(SQLERRM, 1, 100);
dbms_output.put_line('Update Row Unexpected Error: ' || l_err_text);
END Update_Row;
* Procedure : Insert_Row
* Parameters IN : Substitute Component Record as given by the User
* Sub. Comps Unexposed Cols. Record
* Parameters OUT: Substitute Component Record
* Return_Status - Indicating success or faliure
* Mesg_Token_Tbl - Filled with any errors or warnings
* Purpose : Will Insert a new substitute component record in
* Bom_Substitute_Components table.
*
********************************************************************/
PROCEDURE Insert_Row
( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
, p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
, x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
, x_return_status OUT NOCOPY VARCHAR2
)
IS
l_processed BOOLEAN;
INSERT INTO BOM_SUBSTITUTE_COMPONENTS
( SUBSTITUTE_COMPONENT_ID
, LAST_UPDATE_DATE
, LAST_UPDATED_BY
, CREATION_DATE
, CREATED_BY
, LAST_UPDATE_LOGIN
, SUBSTITUTE_ITEM_QUANTITY
, COMPONENT_SEQUENCE_ID
, ACD_TYPE
, CHANGE_NOTICE
, REQUEST_ID
, PROGRAM_APPLICATION_ID
, PROGRAM_UPDATE_DATE
, ATTRIBUTE_CATEGORY
, ATTRIBUTE1
, ATTRIBUTE2
, ATTRIBUTE3
, ATTRIBUTE4
, ATTRIBUTE5
, ATTRIBUTE6
, ATTRIBUTE7
, ATTRIBUTE8
, ATTRIBUTE9
, ATTRIBUTE10
, ATTRIBUTE11
, ATTRIBUTE12
, ATTRIBUTE13
, ATTRIBUTE14
, ATTRIBUTE15
, PROGRAM_ID
, Original_System_Reference
)
VALUES
( p_sub_comp_unexp_rec.substitute_component_id
, SYSDATE
, Bom_globals.Get_User_Id
, SYSDATE
, Bom_Globals.Get_User_Id
, Bom_Globals.Get_User_Id
, p_sub_component_rec.substitute_item_quantity
, p_sub_comp_Unexp_rec.component_sequence_id
, p_sub_component_rec.acd_type
, p_sub_component_rec.Eco_Name
, NULL /* Request Id */
, Bom_Globals.Get_Prog_AppId
, SYSDATE
, p_sub_component_rec.attribute_category
, p_sub_component_rec.attribute1
, p_sub_component_rec.attribute2
, p_sub_component_rec.attribute3
, p_sub_component_rec.attribute4
, p_sub_component_rec.attribute5
, p_sub_component_rec.attribute6
, p_sub_component_rec.attribute7
, p_sub_component_rec.attribute8
, p_sub_component_rec.attribute9
, p_sub_component_rec.attribute10
, p_sub_component_rec.attribute11
, p_sub_component_rec.attribute12
, p_sub_component_rec.attribute13
, p_sub_component_rec.attribute14
, p_sub_component_rec.attribute15
, Bom_Globals.Get_Prog_Id
, p_sub_component_rec.Original_System_Reference
);
'Utility (Substitute Component Insert)' ||
SUBSTR(SQLERRM, 1, 100);
END Insert_Row;
* Procedure : Delete_Row
* Parameters IN : Primary Key of Substitute Component Table
* Parameters OUT: Return_Status - Indicating success or faliure
* Mesg_Token_Tbl - Filled with any errors or warnings
* Purpose : Will delete a substitute component record using the
* primary unique key.
********************************************************************/
PROCEDURE Delete_Row
( p_substitute_component_id IN NUMBER
, p_change_notice IN VARCHAR2
, p_component_sequence_id IN NUMBER
, p_acd_type IN NUMBER
, x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
, x_return_status OUT NOCOPY VARCHAR2
)
IS
l_processed BOOLEAN;
DELETE FROM BOM_SUBSTITUTE_COMPONENTS
WHERE SUBSTITUTE_COMPONENT_ID = p_substitute_component_id
AND COMPONENT_SEQUENCE_ID = p_component_sequence_id
AND ACD_TYPE = p_acd_type
;
'Utility (Substitute Component Delete_Row)' ||
SUBSTR(SQLERRM, 1, 100);
END Delete_Row;
SELECT SUBSTITUTE_ITEM_QUANTITY
, ATTRIBUTE_CATEGORY
, ATTRIBUTE1
, ATTRIBUTE2
, ATTRIBUTE3
, ATTRIBUTE4
, ATTRIBUTE5
, ATTRIBUTE6
, ATTRIBUTE7
, ATTRIBUTE8
, ATTRIBUTE9
, ATTRIBUTE10
, ATTRIBUTE11
, ATTRIBUTE12
, ATTRIBUTE13
, ATTRIBUTE14
, ATTRIBUTE15
, CHANGE_NOTICE
, ACD_TYPE
, SUBSTITUTE_COMPONENT_ID
, COMPONENT_SEQUENCE_ID
INTO l_sub_component_rec.substitute_item_quantity
, l_sub_component_rec.attribute_category
, l_sub_component_rec.attribute1
, l_sub_component_rec.attribute2
, l_sub_component_rec.attribute3
, l_sub_component_rec.attribute4
, l_sub_component_rec.attribute5
, l_sub_component_rec.attribute6
, l_sub_component_rec.attribute7
, l_sub_component_rec.attribute8
, l_sub_component_rec.attribute9
, l_sub_component_rec.attribute10
, l_sub_component_rec.attribute11
, l_sub_component_rec.attribute12
, l_sub_component_rec.attribute13
, l_sub_component_rec.attribute14
, l_sub_component_rec.attribute15
, l_Sub_Component_Rec.Eco_Name
, l_Sub_Component_Rec.Acd_Type
, x_Sub_comp_Unexp_Rec.Substitute_Component_Id
, x_Sub_Comp_Unexp_Rec.Component_Sequence_Id
FROM BOM_SUBSTITUTE_COMPONENTS
WHERE SUBSTITUTE_COMPONENT_ID = p_substitute_component_id
AND COMPONENT_SEQUENCE_ID = p_component_sequence_id
AND ACD_TYPE = p_acd_type
;
Insert_Row( p_sub_component_rec => l_sub_component_rec
, p_Sub_Comp_Unexp_Rec => l_sub_comp_unexp_rec
, x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
, x_return_status => l_return_status
);
ELSIF l_sub_component_rec.transaction_type = Bom_Globals.G_OPR_UPDATE
THEN
Update_Row( p_sub_component_rec => l_sub_component_rec
, p_Sub_Comp_Unexp_Rec => l_sub_comp_unexp_rec
, x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
, x_return_status => l_return_status
);
ELSIF l_sub_component_rec.transaction_type = Bom_Globals.G_OPR_DELETE
THEN
Delete_Row
( p_substitute_component_id =>
l_sub_comp_unexp_rec.substitute_component_id
, p_change_notice =>
l_sub_component_rec.eco_name
, p_component_sequence_id =>
l_sub_comp_unexp_rec.component_sequence_id
, p_acd_type =>
l_sub_component_rec.acd_type
, x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
, x_return_status => l_return_status
);