204:
205: -- Case 3. Rebuild WO with a parent.
206: if l_parent_weid is not null then
207: select class_code into x_class_code from
208: wip_discrete_jobs where
209: wip_entity_id = l_parent_weid
210: and organization_id = p_org_id;
211: return;
212:
459:
460: -- Case 3. Rebuild WO with a parent.
461: if l_parent_weid is not null then
462: select class_code into x_class_code from
463: wip_discrete_jobs where
464: wip_entity_id = l_parent_weid
465: and organization_id = p_org_id;
466: return;
467:
612: begin
613:
614: select nvl(asset_number,rebuild_serial_number), nvl(asset_group_id,rebuild_item_id)
615: into l_asset_number, l_inv_item_id
616: from wip_discrete_jobs
617: where wip_entity_id = p_wip_entity_id
618: and organization_id = p_organization_id;
619:
620:
828: owning_department
829: into l_start_date,
830: l_completion_date,
831: l_owning_department_id
832: from wip_discrete_jobs
833: where wip_entity_id = l_wip_entity_id
834: and organization_id = l_organization_id;
835:
836: if (l_owning_department_id is null) then
836: if (l_owning_department_id is null) then
837: /* Changes for IB convergence */
838: /* select distinct msn.owning_department_id
839: into l_owning_department_id
840: from wip_discrete_jobs wdj,mtl_serial_numbers msn
841: where wdj.asset_group_id = msn.inventory_item_id (+)
842: and wdj.organization_id = msn.current_organization_id (+)
843: and wdj.asset_number = msn.serial_number (+)
844: and wdj.wip_entity_id = l_wip_entity_id
845: and wdj.organization_id = l_organization_id;*/
846:
847: select eomd.owning_department_id
848: into l_owning_department_id
849: from eam_org_maint_defaults eomd, wip_discrete_jobs wdj
850: where wdj.maintenance_object_type = 3
851: and wdj.organization_id = eomd.organization_id (+)
852: and eomd.object_type (+) = 50
853: and eomd.object_id (+) = wdj.maintenance_object_id