SELECT DISTINCT SHIP.SERIAL_ID , PHYS.INV_LOT_ID , PHYS.QTY_BASE , ITM.UNIT_MEASURE_STD , INV.REQ_ID , INV.BUSINESS_UNIT , INV.SOURCE_BUS_UNIT , INV.INTERUNIT_ID , INV.INTERUNIT_LINE FROM PS_DEMAND_PHYS_INV PHYS , PS_SHIP_SERIAL_INV SHIP , PS_MASTER_ITEM_TBL ITM , PS_IN_DEMAND INV , PS_SET_CNTRL_REC SC WHERE SC.RECNAME = 'MASTER_ITEM_TBL' AND ITM.SETID = SC.SETID AND INV.BUSINESS_UNIT = SC.SETCNTRLVALUE AND INV.INV_ITEM_ID = ITM.INV_ITEM_ID AND INV.IN_FULFILL_STATE='70' AND INV.INTERUNIT_FLG = 'Y' AND INV.INTERUNIT_STAT = 'I' 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.INV_ITEM_ID = INV.INV_ITEM_ID 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.QTY_PICKED > 0 AND SHIP.BUSINESS_UNIT = INV.BUSINESS_UNIT AND SHIP.DEMAND_SOURCE = INV.DEMAND_SOURCE AND SHIP.SOURCE_BUS_UNIT = INV.SOURCE_BUS_UNIT AND SHIP.ORDER_NO = INV.ORDER_NO AND SHIP.INV_ITEM_ID = INV.INV_ITEM_ID AND SHIP.ORDER_INT_LINE_NO = INV.ORDER_INT_LINE_NO AND SHIP.SCHED_LINE_NBR = INV.SCHED_LINE_NBR AND SHIP.DEMAND_LINE_NO = INV.DEMAND_LINE_NO GROUP BY SHIP.SERIAL_ID , PHYS.INV_LOT_ID , PHYS.QTY_BASE , ITM.UNIT_MEASURE_STD , INV.REQ_ID , INV.BUSINESS_UNIT , INV.SOURCE_BUS_UNIT, INV.INTERUNIT_ID, INV.INTERUNIT_LINE
|