SELECT DISTINCT A.BUSINESS_UNIT , A.PRODUCTION_ID , B.LANGUAGE_CD , B.DESCR FROM PS_SF_PRDNID_HEADR A , PS_MASTER_ITM_LANG B WHERE A.INV_ITEM_ID = B.INV_ITEM_ID AND B.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC E WHERE A.BUSINESS_UNIT = E.SETCNTRLVALUE AND E.RECNAME = 'MASTER_ITEM_TBL') AND (EXISTS ( SELECT 'X' FROM PS_TRANSACTION_INV C WHERE C.BUSINESS_UNIT = A.BUSINESS_UNIT AND ((C.PRODUCTION_ID = A.PRODUCTION_ID AND C.TRANSACTION_GROUP IN ('220', '230')) OR (C.TO_PRDN_ID = A.PRODUCTION_ID AND C.TRANSACTION_GROUP IN ('221', '223')))))
|