DBA Data[Home] [Help]

APPS.WIP_RES_INST_VALIDATIONS dependencies on WIP_OP_RESOURCE_INSTANCES

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

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

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

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

Line 489: from wip_op_resource_instances

485: l_count := 0;
486: else
487: Begin
488: select count(*) into l_count
489: from wip_op_resource_instances
490: where wip_entity_id = p_wip_entity_id
491: and organization_id = p_organization_id
492: and operation_seq_num = p_operation_seq_num
493: and resource_seq_num = p_resource_seq_num;

Line 768: from wip_op_resource_instances wori

764: and wjdi.operation_seq_num = p_operation_seq_num
765: and wjdi.resource_seq_num = p_resource_seq_num
766: and wjdi.resource_instance_id= p_instance_id
767: and not exists (select 1
768: from wip_op_resource_instances wori
769: where wori.wip_entity_id = wjdi.wip_entity_id
770: and wori.organization_id = wjdi.organization_id
771: and wori.operation_seq_num = wjdi.operation_seq_num
772: and wori.resource_seq_num = wjdi.resource_seq_num

Line 809: from wip_op_resource_instances wori

805: and wjdi.operation_seq_num = p_operation_seq_num
806: and wjdi.resource_seq_num = p_resource_seq_num
807: and wjdi.resource_instance_id= p_instance_id
808: and not exists (select 1
809: from wip_op_resource_instances wori
810: where wori.wip_entity_id = wjdi.wip_entity_id
811: and wori.organization_id = wjdi.organization_id
812: and wori.operation_seq_num = wjdi.operation_seq_num
813: and wori.resource_seq_num = wjdi.resource_seq_num

Line 929: update wip_op_resource_instances wori

925: p_substitution_type,
926: cur_row.operation_seq_num,
927: cur_row.resource_seq_num)= 0 THEN
928:
929: update wip_op_resource_instances wori
930: set wori.instance_id = cur_row.resource_instance_id
931: where wori.wip_entity_id = p_wip_entity_id
932: and wori.organization_id = p_organization_id
933: and wori.operation_seq_num = cur_row.operation_seq_num