SELECT BUSINESS_UNIT ,A.EXD_DOC_NBR_SER ,D.language_cd , D.DESCR1 FROM PS_ORG_DOC_NBR_RNG A , PS_ORG_DOC_NBR_SER B , PS_ORG_BU_TAX_APPL C ,PS_ORG_DOC_SER_LNG D WHERE B.setid=d.setid AND B.EXD_DOC_NBR_SER=d.EXD_DOC_NBR_SER AND A.START_DT =( SELECT MAX(START_DT) FROM PS_ORG_DOC_NBR_RNG WHERE START_DT <= %CurrentDateIn AND SETID=B.SETID AND SETID=C.ORG_SETID AND ORG_CODE=C.ORG_CODE AND ORG_TAX_LOC_CD=C.ORG_TAX_LOC_CD AND C.ORG_BU_TYPE='IN' AND EXD_DOC_NBR_SER=B.EXD_DOC_NBR_SER) AND A.SETID=B.SETID AND A.SETID=C.ORG_SETID AND A.ORG_CODE=C.ORG_CODE AND A.ORG_TAX_LOC_CD=C.ORG_TAX_LOC_CD AND C.ORG_BU_TYPE='IN' AND A.EXD_DOC_NBR_SER=B.EXD_DOC_NBR_SER AND B.EXD_TXN_TYPE IN ('DOMS', 'DEXB', 'DEXP', 'EXP', 'EXPB', 'MEIN', 'STFR')
|