WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR  EXIT FAILURE ROLLBACK;

spool EXP_EXPENSE_REQ_TYPES_VL.log

prompt
prompt Creating table EXP_EXPENSE_REQ_TYPES_VL
prompt ============================
prompt

CREATE OR REPLACE force VIEW EXP_EXPENSE_REQ_TYPES_VL AS
SELECT A.EXPENSE_REQUISITION_TYPE_ID,
       A.COMPANY_ID,
       A.EXPENSE_REQUISITION_TYPE_CODE,
       B.DESCRIPTION_TEXT AS DESCRIPTION,
       A.CURRENCY_CODE,
       A.EXPENSE_REPORT_TYPE_ID,
       A.ENABLED_FLAG,
       A.LINE_NUMBER_BEGINNING,
       A.STEP_LENGTH,
       A.AUTO_APPROVE_FLAG,
       A.AUTO_AUDIT_FLAG,
			 A.PAYMENT_OBJECT,
       A.CREATION_DATE,
       A.CREATED_BY,
       A.LAST_UPDATE_DATE,
       A.LAST_UPDATED_BY,
			 A.ACCRUED_FLAG,
			 A.ONE_OFF_FLAG,
			 A.TOLERANCE_FLAG,
			 A.TOLERANCE_RANGE,
			 A.TOLERANCE_RATIO,
       A.REPORT_NAME,
       A.RESERVE_BUDGET,
       A.BUDGET_CONTROL_ENABLED,
	   a.document_page_type
  FROM EXP_EXPENSE_REQ_TYPES A,
       FND_DESCRIPTIONS B
 WHERE A.DESCRIPTION_ID = B.DESCRIPTION_ID(+) AND
       B.REF_TABLE(+) = 'EXP_EXPENSE_REQ_TYPES' AND
       B.REF_FIELD(+) = 'DESCRIPTION_ID' AND
       B.LANGUAGE(+) = USERENV('lang');
/

spool off

exit
