148: from wip_requirement_operations wro,
149: mtl_system_items_kfv msi,
150: wip_operations wo,
151: mtl_item_locations_kfv milk,
152: wip_discrete_jobs wdj,
153: mtl_parameters mp,
154: -- Fixed bug 4692413. We should not refer to column in kfv directly.
155: mtl_item_locations mil
156: where wro.inventory_item_id = msi.inventory_item_id
1693: MAX(wo.operation_seq_num)
1694: INTO l_first_op,
1695: l_last_op
1696: FROM wip_operations wo,
1697: wip_discrete_jobs wdj
1698: WHERE wdj.organization_id = wo.organization_id
1699: AND wdj.wip_entity_id = wo.wip_entity_id
1700: AND wdj.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)
1701: AND wdj.wip_entity_id = p_wipEntityID
3113: MAX(wo.operation_seq_num)
3114: INTO l_first_op,
3115: l_last_op
3116: FROM wip_operations wo,
3117: wip_discrete_jobs wdj
3118: WHERE wdj.organization_id = wo.organization_id
3119: AND wdj.wip_entity_id = wo.wip_entity_id
3120: AND wdj.status_type in (WIP_CONSTANTS.RELEASED, WIP_CONSTANTS.COMP_CHRG)
3121: AND wdj.wip_entity_id = p_wipEntityID