DBA Data[Home] [Help]

APPS.WIP_RES_INST_VALIDATIONS dependencies on WIP_OP_RESOURCE_INSTANCES

Line 463: -- Get currently added resource instances from wip_op_resource_instances table.

459: -- The logic to check for assigned units is as follows.
460: -- Get the assigned units value from wip_operation_resources. This
461: -- will be the benchmark against which we check for the total resource
462: -- instance number.
463: -- Get currently added resource instances from wip_op_resource_instances table.
464: -- Get the number of resource instances being added in the current run and add it
465: -- to the above number.
466: -- Get the number of resource instances being deleted in the current run and subtract it
467: -- from the above number.

Line 472: -- all existing resource instances in wip_op_resource_instances before adding

468: -- Now, this number should be equal to the assigned_units value we got from the first step.
469:
470: -- Fix bug #5752548:
471: -- Since ASCP will always insert entire instance data, massload program deletes
472: -- all existing resource instances in wip_op_resource_instances before adding
473: -- new instances inserted by ASCP. Hence, the existing instances should not be
474: -- counted when validating assigned units.
475:
476: l_source_code := '';

Line 494: from wip_op_resource_instances

490: l_count := 0;
491: else
492: Begin
493: select count(*) into l_count
494: from wip_op_resource_instances
495: where wip_entity_id = p_wip_entity_id
496: and organization_id = p_organization_id
497: and operation_seq_num = p_operation_seq_num
498: and resource_seq_num = p_resource_seq_num;

Line 773: from wip_op_resource_instances wori

769: and wjdi.operation_seq_num = p_operation_seq_num
770: and wjdi.resource_seq_num = p_resource_seq_num
771: and wjdi.resource_instance_id= p_instance_id
772: and not exists (select 1
773: from wip_op_resource_instances wori
774: where wori.wip_entity_id = wjdi.wip_entity_id
775: and wori.organization_id = wjdi.organization_id
776: and wori.operation_seq_num = wjdi.operation_seq_num
777: and wori.resource_seq_num = wjdi.resource_seq_num

Line 814: from wip_op_resource_instances wori

810: and wjdi.operation_seq_num = p_operation_seq_num
811: and wjdi.resource_seq_num = p_resource_seq_num
812: and wjdi.resource_instance_id= p_instance_id
813: and not exists (select 1
814: from wip_op_resource_instances wori
815: where wori.wip_entity_id = wjdi.wip_entity_id
816: and wori.organization_id = wjdi.organization_id
817: and wori.operation_seq_num = wjdi.operation_seq_num
818: and wori.resource_seq_num = wjdi.resource_seq_num

Line 934: update wip_op_resource_instances wori

930: p_substitution_type,
931: cur_row.operation_seq_num,
932: cur_row.resource_seq_num)= 0 THEN
933:
934: update wip_op_resource_instances wori
935: set wori.instance_id = cur_row.resource_instance_id
936: where wori.wip_entity_id = p_wip_entity_id
937: and wori.organization_id = p_organization_id
938: and wori.operation_seq_num = cur_row.operation_seq_num