DBA Data[Home] [Help]

APPS.WIP_OP_RESOURCES_UTILITIES SQL Statements

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

Line: 12

          SELECT  count(*)
           FROM   WIP_OPERATION_RESOURCES
           WHERE  ORGANIZATION_ID = X_Organization_Id
           AND    WIP_ENTITY_ID = X_Wip_Entity_Id
           AND    OPERATION_SEQ_NUM = X_Operation_Seq_Num
           AND    RESOURCE_SEQ_NUM = X_Resource_Seq_Num;
Line: 19

          SELECT  count(*)
           FROM   WIP_SUB_OPERATION_RESOURCES
           WHERE  ORGANIZATION_ID = X_Organization_Id
           AND    WIP_ENTITY_ID = X_Wip_Entity_Id
           AND    OPERATION_SEQ_NUM = X_Operation_Seq_Num
           AND    RESOURCE_SEQ_NUM = X_Resource_Seq_Num;
Line: 26

          SELECT  count(*)
           FROM   WIP_OPERATION_RESOURCES
           WHERE  ORGANIZATION_ID = X_Organization_Id
           AND    WIP_ENTITY_ID = X_Wip_Entity_Id
           AND    OPERATION_SEQ_NUM = X_Operation_Seq_Num
           AND    RESOURCE_SEQ_NUM = X_Resource_Seq_Num
           AND    REPETITIVE_SCHEDULE_ID = X_Repetitive_Schedule_Id;
Line: 62

            SELECT count(*)
              FROM WIP_OPERATION_RESOURCES
             WHERE ORGANIZATION_ID = X_Organization_Id
               AND WIP_ENTITY_ID = X_Wip_Entity_Id
               AND OPERATION_SEQ_NUM = X_Operation_Seq_Num
               AND RESOURCE_SEQ_NUM <> X_Resource_Seq_Num
               AND AUTOCHARGE_TYPE = 4;
Line: 70

            SELECT count(*)
              FROM WIP_OPERATION_RESOURCES
             WHERE ORGANIZATION_ID = X_Organization_Id
               AND WIP_ENTITY_ID = X_Wip_Entity_Id
               AND REPETITIVE_SCHEDULE_ID = X_Repetitive_Schedule_Id
               AND OPERATION_SEQ_NUM = X_Operation_Seq_Num
               AND RESOURCE_SEQ_NUM <> X_Resource_Seq_Num
               AND AUTOCHARGE_TYPE = 4;
Line: 102

            SELECT count(*)
              FROM WIP_OPERATION_RESOURCES
             WHERE ORGANIZATION_ID = X_Organization_Id
               AND WIP_ENTITY_ID = X_Wip_Entity_Id
               AND OPERATION_SEQ_NUM = X_Operation_Seq_Num
               AND RESOURCE_SEQ_NUM <> X_Resource_Seq_Num
               AND SCHEDULED_FLAG = 3;
Line: 110

            SELECT count(*)
              FROM WIP_OPERATION_RESOURCES
             WHERE ORGANIZATION_ID = X_Organization_Id
               AND WIP_ENTITY_ID = X_Wip_Entity_Id
               AND REPETITIVE_SCHEDULE_ID = X_Repetitive_Schedule_Id
               AND OPERATION_SEQ_NUM = X_Operation_Seq_Num
               AND RESOURCE_SEQ_NUM <> X_Resource_Seq_Num
               AND SCHEDULED_FLAG = 3;
Line: 142

            SELECT count(*)
              FROM WIP_OPERATION_RESOURCES
             WHERE ORGANIZATION_ID = X_Organization_Id
               AND WIP_ENTITY_ID = X_Wip_Entity_Id
               AND OPERATION_SEQ_NUM = X_Operation_Seq_Num
               AND RESOURCE_SEQ_NUM <> X_Resource_Seq_Num
               AND SCHEDULED_FLAG = 4;
Line: 150

            SELECT count(*)
              FROM WIP_OPERATION_RESOURCES
             WHERE ORGANIZATION_ID = X_Organization_Id
               AND WIP_ENTITY_ID = X_Wip_Entity_Id
               AND REPETITIVE_SCHEDULE_ID = X_Repetitive_Schedule_Id
               AND OPERATION_SEQ_NUM = X_Operation_Seq_Num
               AND RESOURCE_SEQ_NUM <> X_Resource_Seq_Num
               AND SCHEDULED_FLAG = 4;
Line: 184

        select 1
        from wip_cost_txn_interface
        where organization_id = X_Organization_Id
        and wip_entity_id = X_Wip_Entity_Id
        and operation_seq_num = X_Operation_Seq_Num
        and resource_seq_num = X_Resource_Seq_Num;
Line: 192

        select 1
        from wip_transactions
        where organization_id = X_Organization_Id
        and wip_entity_id = X_Wip_Entity_Id
        and operation_seq_num = X_Operation_Seq_Num
        and resource_seq_num = X_Resource_Seq_Num;
Line: 200

        select 1
        from wip_cost_txn_interface
        where organization_id = X_Organization_Id
        and wip_entity_id = X_Wip_Entity_Id
        and operation_seq_num = X_Operation_Seq_Num
        and resource_seq_num = X_Resource_Seq_Num
        and line_id = X_Line_Id;
Line: 209

        select 1
        from wip_transactions
        where organization_id = X_Organization_Id
        and wip_entity_id = X_Wip_Entity_Id
        and operation_seq_num = X_Operation_Seq_Num
        and resource_seq_num = X_Resource_Seq_Num
        and line_id = X_Line_Id;
Line: 249

        UPDATE wip_operation_resources
        SET    start_date = X_First_Unit_Start_Date,
               completion_date = X_Last_Unit_Completion_Date
        WHERE  wip_entity_id = X_Wip_Entity_Id
        AND    organization_id = X_Organization_Id
        AND    operation_seq_num = X_Operation_Seq_Num
        AND    resource_seq_num = X_Resource_Seq_Num;
Line: 257

        UPDATE wip_operation_resources
        SET    start_date = X_First_Unit_Start_Date,
               completion_date = X_Last_Unit_Completion_Date
        WHERE  wip_entity_id = X_Wip_Entity_Id
        AND    organization_id = X_Organization_Id
        AND    operation_seq_num = X_Operation_Seq_Num
        AND    resource_seq_num = X_Resource_Seq_Num
        AND    repetitive_schedule_id = X_Repetitive_Schedule_Id;
Line: 272

     SELECT UOM_CLASS
       FROM MTL_UOM_CONVERSIONS CON
      WHERE CON.UOM_CODE = X_Unit
        AND CON.INVENTORY_ITEM_ID = 0;
Line: 284

 Procedure delete_orphaned_alternates (p_wip_entity_id in number,
                                       p_schedule_id in number,
                                       x_return_status out nocopy varchar2) is
  begin
        x_return_status := fnd_api.g_ret_sts_success;
Line: 290

       delete from wip_sub_operation_resources wsor
         where wip_entity_id = p_wip_entity_id
              and nvl(repetitive_schedule_id, -1) = nvl(p_schedule_id, -1)
              and not exists (select 1
                                from wip_operation_resources wor
                               where wor.wip_entity_id = p_wip_entity_id
                                 and nvl(wor.repetitive_schedule_id, -1) = nvl(p_schedule_id, -1)
                                 and wor.operation_seq_num = wsor.operation_seq_num
                                 and wor.substitute_group_num = wsor.substitute_group_num);
Line: 302

  end delete_orphaned_alternates;
Line: 310

        select operation_seq_num
          from wip_operations
        where wip_entity_id = p_wip_entity_id
             and nvl(repetitive_schedule_id,-1) = nvl(p_schedule_id, -1);
Line: 318

        select * from (select resource_seq_num,
                     schedule_seq_num,
                     substitute_group_num,
                     scheduled_flag,
                     parent_resource_seq /* added for bug 4747951 */
          from wip_operation_resources
       where wip_entity_id = p_wip_entity_id
            and nvl(repetitive_schedule_id,-1) = nvl(p_schedule_id,-1)
            and operation_seq_num = p_op_seq_num
         union
         select resource_seq_num,
                     schedule_seq_num,
                     substitute_group_num,
                     scheduled_flag,
                     null parent_resource_seq  /* added for bug 4747951 */
          from wip_sub_operation_resources
       where wip_entity_id = p_wip_entity_id
            and nvl(repetitive_schedule_id,-1) = nvl(p_schedule_id,-1)
            and operation_seq_num = p_op_seq_num
        )
        order by nvl(schedule_seq_num, resource_seq_num);
Line: 415

Procedure Update_Resource_Instances(p_wip_entity_id NUMBER,
                                    p_org_id NUMBER) is
  cursor operation_rsc (p_wip_entity_id NUMBER, p_org_id NUMBER) is
        select operation_seq_num,
               resource_seq_num,
               start_date,
               completion_date
          from wip_operation_resources
        where wip_entity_id = p_wip_entity_id
             and organization_id = p_org_id;
Line: 428

    UPDATE wip_op_resource_instances
    SET start_date = cur_rsc.start_date,
        completion_date = cur_rsc.completion_date
    WHERE wip_entity_id = p_wip_entity_id
      and organization_id = p_org_id
      and operation_seq_num = cur_rsc.operation_seq_num
      and resource_seq_num = cur_rsc.resource_seq_num;
Line: 436

End Update_Resource_Instances;