SELECT FIELDNAME ,' ' ,PROMPT_TBL ,1 FROM PS_FS_FLD_PROMPT WHERE 1=1 AND FIELDNAME = 'BUSINESS_UNIT' UNION ALL SELECT C.FIELDNAME ,C.AFF_RELATED_CF ,D.PROMPT_TBL ,CF_ORDER+1 FROM PSRECFIELDDB A ,PS_FS_CF_TEMPLATE C ,PS_FS_FLD_PROMPT D , PS_INSTALLATION E WHERE A.RECNAME='LEDGER' AND A.FIELDNAME = C.FIELDNAME AND C.CF_ACTIVE_STATUS = 'A' AND CF_TYPE <> 'A' AND A.FIELDNAME = D.FIELDNAME AND ((E.PC <> 'Y' AND A.FIELDNAME = 'PROJECT_ID') OR A.FIELDNAME <> 'PROJECT_ID') UNION ALL SELECT DISTINCT B.FIELDNAME ,' ' ,B.PROMPT_TBL ,98 FROM PSRECFIELDDB A ,PS_FS_FLD_PROMPT B ,PS_ACCT_ATTRIB_TBL C WHERE 1=1 AND A.FIELDNAME = B.FIELDNAME AND C.FIELDNAME = B.FIELDNAME AND C.ACTIVE_FLAG = 'Y' AND B.FIELDNAME IN ('BOOK_CODE') UNION ALL SELECT DISTINCT B.FIELDNAME ,' ' ,B.PROMPT_TBL ,99 FROM PSRECFIELDDB A ,PS_FS_FLD_PROMPT B WHERE 1=1 AND A.FIELDNAME = B.FIELDNAME AND B.FIELDNAME IN ('GL_ADJUST_TYPE')
|