DBA Data[Home] [Help]

APPS.EAM_RES_INST_UTILITY_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 57

                SELECT
                         start_date
                       , completion_date
                       , batch_id
                INTO
                         l_eam_res_inst_rec.start_date
                       , l_eam_res_inst_rec.completion_date
                       , l_eam_res_inst_rec.top_level_batch_id
                FROM     wip_op_resource_instances
                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
                  AND    instance_id       = p_instance_id
                  AND    serial_number     IS null;
Line: 78

                SELECT
                         serial_number
                       , start_date
                       , completion_date
                       , batch_id
                INTO
                         l_eam_res_inst_rec.serial_number
                       , l_eam_res_inst_rec.start_date
                       , l_eam_res_inst_rec.completion_date
                       , l_eam_res_inst_rec.top_level_batch_id
                FROM     wip_op_resource_instances
                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
                  AND    instance_id       = p_instance_id
                  AND    serial_number     = p_serial_number;
Line: 114

        * Procedure     : Insert_Row
        * Parameters IN : Resource Instances column record
        * Parameters OUT NOCOPY: Message Token Table
        *                 Return Status
        * Purpose       : Procedure will perfrom an insert into the
        *                 win_op_resource_instances table.
        *********************************************************************/

        PROCEDURE Insert_Row
        (  p_eam_res_inst_rec   IN  EAM_PROCESS_WO_PUB.eam_res_inst_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 Instance rec for ' || p_eam_res_inst_rec.instance_id); END IF;
Line: 139

                INSERT INTO WIP_OP_RESOURCE_INSTANCES
                       ( wip_entity_id
                       , organization_id
                       , operation_seq_num
                       , resource_seq_num
                       , instance_id
                       , serial_number
                       , start_date
                       , completion_date
                       , batch_id
                       , last_update_date
                       , last_updated_by
                       , creation_date
                       , created_by
                       , last_update_login
                       )
                VALUES
                       ( p_eam_res_inst_rec.wip_entity_id
                       , p_eam_res_inst_rec.organization_id
                       , p_eam_res_inst_rec.operation_seq_num
                       , p_eam_res_inst_rec.resource_seq_num
                       , p_eam_res_inst_rec.instance_id
                       , p_eam_res_inst_rec.serial_number
                       , p_eam_res_inst_rec.start_date
                       , p_eam_res_inst_rec.completion_date
                       , p_eam_res_inst_rec.top_level_batch_id
                       , SYSDATE
                       , FND_GLOBAL.user_id
                       , SYSDATE
                       , FND_GLOBAL.user_id
                       , FND_GLOBAL.login_id
                       );
Line: 181

                         , p_message_text       => G_PKG_NAME ||' :Inserting Record ' || SQLERRM
                         , x_mesg_token_Tbl     => x_mesg_token_tbl
                        );
Line: 187

        END Insert_Row;
Line: 190

        * Procedure     : Update_Row
        * Parameters IN : Resource Instances column record
        * Parameters OUT NOCOPY: Message Token Table
        *                 Return Status
        * Purpose       : Procedure will perfrom an Update on the
        *                 wip_op_resource_instances table.
        *********************************************************************/

        PROCEDURE Update_Row
        (  p_eam_res_inst_rec   IN  EAM_PROCESS_WO_PUB.eam_res_inst_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('Updating Resource Instance: '|| p_eam_res_inst_rec.instance_id); END IF;
Line: 215

                UPDATE WIP_OP_RESOURCE_INSTANCES
                SET      serial_number               = p_eam_res_inst_rec.serial_number
                       , start_date                  = p_eam_res_inst_rec.start_date
                       , completion_date             = p_eam_res_inst_rec.completion_date
                       , batch_id                    = p_eam_res_inst_rec.top_level_batch_id
                       , last_update_date            = SYSDATE
                       , last_updated_by             = FND_GLOBAL.user_id
                       , last_update_login           = FND_GLOBAL.login_id
                WHERE    wip_entity_id     = p_eam_res_inst_rec.wip_entity_id
                  AND    organization_id   = p_eam_res_inst_rec.organization_id
                  AND    operation_seq_num = p_eam_res_inst_rec.operation_seq_num
                  AND    resource_seq_num  = p_eam_res_inst_rec.resource_seq_num
                  AND    instance_id       = p_eam_res_inst_rec.instance_id
		  AND    (serial_number IS NULL OR (serial_number = p_eam_res_inst_rec.serial_number));
Line: 233

        END Update_Row;
Line: 236

        * Procedure     : Delete_Row
        * Parameters IN : Resource Instances column record
        * Parameters OUT NOCOPY: Message Token Table
        *                 Return Status
        * Purpose       : Procedure will perfrom an Update on the
        *                 wip_op_resource_instances table.
        *********************************************************************/

        PROCEDURE Delete_Row
        (  p_eam_res_inst_rec   IN  EAM_PROCESS_WO_PUB.eam_res_inst_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('Deleting Resource Instance: '|| p_eam_res_inst_rec.instance_id); END IF;
Line: 254

                DELETE FROM WIP_OP_RESOURCE_INSTANCES
                WHERE    wip_entity_id     = p_eam_res_inst_rec.wip_entity_id
                  AND    organization_id   = p_eam_res_inst_rec.organization_id
                  AND    operation_seq_num = p_eam_res_inst_rec.operation_seq_num
                  AND    resource_seq_num  = p_eam_res_inst_rec.resource_seq_num
                  AND    instance_id       = p_eam_res_inst_rec.instance_id
		  AND    (serial_number IS NULL OR (serial_number=p_eam_res_inst_rec.serial_number));
Line: 265

			DELETE FROM WIP_OPERATION_RESOURCE_USAGE
			WHERE    wip_entity_id     = p_eam_res_inst_rec.wip_entity_id
			  AND    organization_id   = p_eam_res_inst_rec.organization_id
			  AND    operation_seq_num = p_eam_res_inst_rec.operation_seq_num
			  AND    resource_seq_num  = p_eam_res_inst_rec.resource_seq_num
			  AND    instance_id       = p_eam_res_inst_rec.instance_id;
Line: 272

			DELETE FROM WIP_OPERATION_RESOURCE_USAGE
			WHERE    wip_entity_id     = p_eam_res_inst_rec.wip_entity_id
			  AND    organization_id   = p_eam_res_inst_rec.organization_id
			  AND    operation_seq_num = p_eam_res_inst_rec.operation_seq_num
			  AND    resource_seq_num  = p_eam_res_inst_rec.resource_seq_num
			  AND    instance_id       = p_eam_res_inst_rec.instance_id
			  AND    serial_number	   = p_eam_res_inst_rec.serial_number;
Line: 284

        END Delete_Row;
Line: 309

                        Insert_Row
                        (  p_eam_res_inst_rec   => p_eam_res_inst_rec
                         , x_mesg_token_Tbl     => l_mesg_token_tbl
                         , x_return_Status      => l_return_status
                         );
Line: 314

                ELSIF p_eam_res_inst_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE
                THEN
                        Update_Row
                        (  p_eam_res_inst_rec   => p_eam_res_inst_rec
                         , x_mesg_token_Tbl     => l_mesg_token_tbl
                         , x_return_Status      => l_return_status
                         );
Line: 321

                ELSIF p_eam_res_inst_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_DELETE
                THEN
                        Delete_Row
                        (  p_eam_res_inst_rec   => p_eam_res_inst_rec
                         , x_mesg_token_Tbl     => l_mesg_token_tbl
                         , x_return_Status      => l_return_status
                         );