The following lines contain the word 'select', 'insert', 'update' or 'delete':
* Purpose : Procedure will perfrom an insert into the
* wip_operation_resource_usage table.
*********************************************************************/
PROCEDURE Add_Usage
( p_eam_res_usage_rec IN EAM_PROCESS_WO_PUB.eam_res_usage_rec_type
, x_mesg_token_Tbl OUT NOCOPY EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type
, x_return_Status OUT NOCOPY VARCHAR2
)
IS
BEGIN
IF EAM_PROCESS_WO_PVT.Get_Debug = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Writing Resource Usage for ' || p_eam_res_usage_rec.resource_seq_num); END IF;
INSERT INTO WIP_OPERATION_RESOURCE_USAGE
( wip_entity_id
, operation_seq_num
, resource_seq_num
, organization_id
, instance_id
, serial_number
, start_date
, completion_date
, assigned_units
, last_update_date
, last_updated_by
, creation_date
, created_by
, last_update_login
, request_id
, program_application_id
, program_id
, program_update_date)
VALUES
( p_eam_res_usage_rec.wip_entity_id
, p_eam_res_usage_rec.operation_seq_num
, p_eam_res_usage_rec.resource_seq_num
, p_eam_res_usage_rec.organization_id
, p_eam_res_usage_rec.instance_id
, p_eam_res_usage_rec.serial_number
, p_eam_res_usage_rec.start_date
, p_eam_res_usage_rec.completion_date
, p_eam_res_usage_rec.assigned_units
, SYSDATE
, FND_GLOBAL.user_id
, SYSDATE
, FND_GLOBAL.user_id
, FND_GLOBAL.login_id
, p_eam_res_usage_rec.request_id
, p_eam_res_usage_rec.program_application_id
, p_eam_res_usage_rec.program_id
, SYSDATE);
, p_message_text => G_PKG_NAME ||' :Inserting Record ' || SQLERRM
, x_mesg_token_Tbl => x_mesg_token_tbl
);
* Procedure : Delete_Usage
* Parameters IN :
* Parameters OUT NOCOPY: Message Token Table
* Return Status
* Purpose : Procedure will perfrom an Delete on the
* wip_operation_resource_usage table.
*********************************************************************/
PROCEDURE Delete_Usage
( p_wip_entity_id IN NUMBER
, p_organization_id IN NUMBER
, p_operation_seq_num IN NUMBER
, p_resource_seq_num IN NUMBER
, x_mesg_token_Tbl OUT NOCOPY EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type
, x_return_Status OUT NOCOPY VARCHAR2
)
IS
BEGIN
IF EAM_PROCESS_WO_PVT.Get_Debug = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Deleting Resource Usage: '|| p_resource_seq_num); END IF;
DELETE FROM WIP_OPERATION_RESOURCE_USAGE
WHERE wip_entity_id = p_wip_entity_id
AND organization_id = p_organization_id
AND operation_seq_num = p_operation_seq_num
AND resource_seq_num = p_resource_seq_num;
END Delete_Usage;