SELECT DISTINCT ' ' , ' ' , 0 , inv.business_unit , inv.interunit_id , inv.interunit_line , itm.language_cd , itm.descr FROM ps_master_itm_lang itm , ps_DEMAND_PHYS_VW phys , ps_STOR_LOC_INV_VW st , PS_IN_DEMAND inv , ps_inv_item_uom conv , ps_set_cntrl_rec sc WHERE sc.recname = 'MASTER_ITM_LANG' AND sc.setcntrlvalue = inv.business_unit AND phys.business_unit = inv.business_unit AND phys.demand_source = inv.demand_source AND phys.source_bus_unit = inv.source_bus_unit AND phys.order_no = inv.order_no AND phys.order_int_line_no = inv.order_int_line_no AND phys.sched_line_nbr = inv.sched_line_nbr AND phys.demand_line_no = inv.demand_line_no AND phys.inv_item_id = inv.inv_item_id AND st.business_unit = phys.business_unit AND st.storage_area = phys.storage_area AND st.stor_level_1 = phys.stor_level_1 AND st.stor_level_2 = phys.stor_level_2 AND st.stor_level_3 = phys.stor_level_3 AND st.stor_level_4 = phys.stor_level_4 AND inv.interunit_id <> ' ' AND itm.setid = sc.setid AND inv.inv_item_id = itm.inv_item_id AND inv.interunit_flg = 'Y' AND inv.interunit_stat = 'I' AND inv.in_fulfill_state BETWEEN '60' AND '70' AND conv.setid = itm.setid AND conv.inv_item_id = itm.inv_item_id AND conv.unit_of_measure = inv.unit_measure_ship AND NOT EXISTS ( SELECT 'x' FROM ps_inv_recv_ln rcv WHERE rcv.source_bus_unit = inv.business_unit AND rcv.interunit_id = inv.interunit_id AND rcv.interunit_line = inv.interunit_line)
|