867: X_department
868: FROM wip_entities we,
869: bom_departments bd,
870: wip_operation_resources wr,
871: wip_operations wn,
872: wip_operations wo
873: WHERE wo.wip_entity_id = X_wip_entity_id
874: AND wo.organization_id = X_to_organization_id
875: AND nvl(wo.repetitive_schedule_id, -1) =
868: FROM wip_entities we,
869: bom_departments bd,
870: wip_operation_resources wr,
871: wip_operations wn,
872: wip_operations wo
873: WHERE wo.wip_entity_id = X_wip_entity_id
874: AND wo.organization_id = X_to_organization_id
875: AND nvl(wo.repetitive_schedule_id, -1) =
876: nvl(X_wip_repetitive_schedule_id, -1)
913: bd.department_code department
914: INTO X_sequence, X_department
915: FROM bom_departments bd,
916: wip_operation_resources wr,
917: wip_operations wn,
918: wip_operations wo
919: WHERE wo.wip_entity_id = X_wip_entity_id
920: AND wo.organization_id = X_to_organization_id
921: AND nvl(wo.repetitive_schedule_id, -1) =
914: INTO X_sequence, X_department
915: FROM bom_departments bd,
916: wip_operation_resources wr,
917: wip_operations wn,
918: wip_operations wo
919: WHERE wo.wip_entity_id = X_wip_entity_id
920: AND wo.organization_id = X_to_organization_id
921: AND nvl(wo.repetitive_schedule_id, -1) =
922: nvl(X_wip_repetitive_schedule_id, -1)
946: --find department code and sequence with out touching resource table.
947: begin
948: select bd.department_code department
949: into X_department
950: from bom_departments bd,wip_operations wn
951: where wn.wip_entity_id = X_wip_entity_id
952: and wn.organization_id = X_to_organization_id
953: and nvl(wn.repetitive_schedule_id, -1) =
954: nvl(X_wip_repetitive_schedule_id, -1)
960:
961: begin
962: SELECT wo.operation_seq_num sequence
963: INTO X_sequence
964: FROM wip_operations wo
965: WHERE wo.wip_entity_id = X_wip_entity_id
966: AND wo.organization_id = X_to_organization_id
967: AND nvl(wo.repetitive_schedule_id, -1) =
968: nvl(X_wip_repetitive_schedule_id, -1)