863: X_department
864: FROM wip_entities we,
865: bom_departments bd,
866: wip_operation_resources wr,
867: wip_operations wn,
868: wip_operations wo
869: WHERE wo.wip_entity_id = X_wip_entity_id
870: AND wo.organization_id = X_to_organization_id
871: AND nvl(wo.repetitive_schedule_id, -1) =
864: FROM wip_entities we,
865: bom_departments bd,
866: wip_operation_resources wr,
867: wip_operations wn,
868: wip_operations wo
869: WHERE wo.wip_entity_id = X_wip_entity_id
870: AND wo.organization_id = X_to_organization_id
871: AND nvl(wo.repetitive_schedule_id, -1) =
872: nvl(X_wip_repetitive_schedule_id, -1)
909: bd.department_code department
910: INTO X_sequence, X_department
911: FROM bom_departments bd,
912: wip_operation_resources wr,
913: wip_operations wn,
914: wip_operations wo
915: WHERE wo.wip_entity_id = X_wip_entity_id
916: AND wo.organization_id = X_to_organization_id
917: AND nvl(wo.repetitive_schedule_id, -1) =
910: INTO X_sequence, X_department
911: FROM bom_departments bd,
912: wip_operation_resources wr,
913: wip_operations wn,
914: wip_operations wo
915: WHERE wo.wip_entity_id = X_wip_entity_id
916: AND wo.organization_id = X_to_organization_id
917: AND nvl(wo.repetitive_schedule_id, -1) =
918: nvl(X_wip_repetitive_schedule_id, -1)
942: --find department code and sequence with out touching resource table.
943: begin
944: select bd.department_code department
945: into X_department
946: from bom_departments bd,wip_operations wn
947: where wn.wip_entity_id = X_wip_entity_id
948: and wn.organization_id = X_to_organization_id
949: and nvl(wn.repetitive_schedule_id, -1) =
950: nvl(X_wip_repetitive_schedule_id, -1)
956:
957: begin
958: SELECT wo.operation_seq_num sequence
959: INTO X_sequence
960: FROM wip_operations wo
961: WHERE wo.wip_entity_id = X_wip_entity_id
962: AND wo.organization_id = X_to_organization_id
963: AND nvl(wo.repetitive_schedule_id, -1) =
964: nvl(X_wip_repetitive_schedule_id, -1)