2619: FROM gme_batch_steps
2620: WHERE batch_id = x_batch_id ;
2621:
2622: CURSOR calculate_mtq_cursor (x_batch_id gme_batch_header.batch_id%TYPE,
2623: x_routingstep_id fm_rout_dtl.routingstep_id%TYPE) IS
2624:
2625:
2626: SELECT
2627: (frh.routing_qty * NVL(frd.minimum_transfer_qty,0)
2638: / (ffm.total_output_qty * frd.step_qty)
2639: FROM fm_form_mst ffm,
2640: fm_matl_dtl fmd,
2641: fm_rout_hdr frh,
2642: fm_rout_dtl frd,
2643: mtl_system_items iim,
2644: gme_batch_header gbh,
2645: gmd_recipe_validity_rules ffe
2646: WHERE gbh.batch_id = x_batch_id