SELECT DISTINCT A.BUSINESS_UNIT , A.ORDER_NO FROM PS_CP_OPT_HDR A , PS_ORD_SCHEDULE B , PS_ORD_LINE C , PS_BUS_UNIT_TBL_FS D , PS_SF_PRDNID_HEADR F WHERE A.MFG_PROCESS_FLG = 'T' AND A.BUSINESS_UNIT = B.BUSINESS_UNIT AND B.BUSINESS_UNIT = C.BUSINESS_UNIT AND C.BUSINESS_UNIT = D.BUSINESS_UNIT AND F.BUSINESS_UNIT = A.BUSINESS_UNIT_IN AND A.BUSINESS_UNIT_IN = B.SHIP_FROM_BU AND B.SHIP_FROM_BU = C.SHIP_FROM_BU AND A.ORDER_NO = B.ORDER_NO AND B.ORDER_NO = C.ORDER_NO AND A.ORDER_INT_LINE_NO = B.ORDER_INT_LINE_NO AND B.ORDER_INT_LINE_NO = C.ORDER_INT_LINE_NO AND A.PRODUCTION_ID = F.PRODUCTION_ID AND A.PRODUCTION_ID <> ' ' AND B.DEMAND_SENT = 'Y' AND A.CP_MODE = 'S' AND C.ORD_LINE_STATUS = 'O' AND B.LOT_ALLOC_FLG = 'N' AND F.PROD_STATUS = '50'
|