AR_RECEIPT_HISTORY_H_V

Details

  • Schema: FUSION

  • Object owner: AR

  • Object type: VIEW

Columns

Name

CRH_ATTRIBUTE1

CRH_ATTRIBUTE10

CRH_ATTRIBUTE11

CRH_ATTRIBUTE12

CRH_ATTRIBUTE13

CRH_ATTRIBUTE14

CRH_ATTRIBUTE15

CRH_ATTRIBUTE2

CRH_ATTRIBUTE3

CRH_ATTRIBUTE4

CRH_ATTRIBUTE5

CRH_ATTRIBUTE6

CRH_ATTRIBUTE7

CRH_ATTRIBUTE8

CRH_ATTRIBUTE9

CRH_ATTRIBUTE_CATEGORY

CRH_BANK_CHARGE_ACCOUNT_CCID

CRH_CASH_RECEIPT_HISTORY_ID

CRH_GL_DATE

CRH_NOTE_STATUS

CRH_REVERSAL_GL_DATE

CRH_STATUS

CRH_TRX_DATE

CRH_ACCOUNT_CCID

CRH_PRV_CRH_ID

CRH_REVERSAL_ID

CRH_REVERSAL_STATUS

EVENT_ID

Query

SQL_Statement

SELECT /*+INDEX(he ar_xla_lines_extract_n1)*/ crh.attribute1 crh_attribute1 ,crh.attribute10 crh_attribute10 ,crh.attribute11 crh_attribute11 ,crh.attribute12 crh_attribute12 ,crh.attribute13 crh_attribute13 ,crh.attribute14 crh_attribute14 ,crh.attribute15 crh_attribute15 ,crh.attribute2 crh_attribute2 ,crh.attribute3 crh_attribute3 ,crh.attribute4 crh_attribute4 ,crh.attribute5 crh_attribute5 ,crh.attribute6 crh_attribute6 ,crh.attribute7 crh_attribute7 ,crh.attribute8 crh_attribute8 ,crh.attribute9 crh_attribute9 ,crh.attribute_category crh_attribute_category ,crh.bank_charge_account_ccid crh_bank_charge_account_ccid ,crh.cash_receipt_history_id crh_cash_receipt_history_id ,crh.gl_date crh_gl_date ,crh.note_status crh_note_status ,crh1.gl_date crh_reversal_gl_date ,crh.status crh_status ,crh.trx_date crh_trx_date ,crh.ACCOUNT_CODE_COMBINATION_ID CRH_ACCOUNT_CCID ,crh.PRV_STAT_CASH_RECEIPT_HIST_ID CRH_PRV_CRH_ID ,crh.REVERSAL_CASH_RECEIPT_HIST_ID CRH_REVERSAL_ID ,crh1.status crh_reversal_status ,he.event_id event_id FROM ar_xla_lines_extract he, ar_cash_receipt_history_all crh, ar_cash_receipt_history_all crh1

where he.level_flag = 'H' and he.crh_status IS NOT NULL AND

crh.event_id = he.event_id AND crh.reversal_cash_receipt_hist_id = crh1.cash_receipt_history_id(+) UNION ALL

SELECT /*+INDEX(he ar_xla_lines_extract_n1) */ crh.attribute1 crh_attribute1 ,crh.attribute10 crh_attribute10 ,crh.attribute11 crh_attribute11

,crh.attribute12 crh_attribute12 ,crh.attribute13 crh_attribute13

,crh.attribute14 crh_attribute14 ,crh.attribute15 crh_attribute15

,crh.attribute2 crh_attribute2 ,crh.attribute3 crh_attribute3

,crh.attribute4 crh_attribute4 ,crh.attribute5 crh_attribute5

,crh.attribute6 crh_attribute6 ,crh.attribute7 crh_attribute7

,crh.attribute8 crh_attribute8 ,crh.attribute9 crh_attribute9

,crh.attribute_category crh_attribute_category ,crh.bank_charge_account_ccid crh_bank_charge_account_ccid ,crh.cash_receipt_history_id crh_cash_receipt_history_id ,crh.gl_date crh_gl_date ,crh.note_status crh_note_status ,crh1.gl_date crh_reversal_gl_date ,crh.status crh_status

,crh.trx_date crh_trx_date ,crh.ACCOUNT_CODE_COMBINATION_ID CRH_ACCOUNT_CCID ,crh.PRV_STAT_CASH_RECEIPT_HIST_ID CRH_PRV_CRH_ID ,crh.REVERSAL_CASH_RECEIPT_HIST_ID CRH_REVERSAL_ID

,crh1.status crh_reversal_status ,he.event_id event_id FROM ar_xla_lines_extract he, ar_cash_receipt_history_all crh, ar_cash_receipt_history_all crh1 where he.level_flag = 'H'

and he.crh_status IS NULL and crh.event_id in

( select /*+ no_unnest index(ra AR_RECEIVABLE_APPLICATIONS_N16) index(c AR_CASH_RECEIPT_HISTORY_U1) use_nl(ra c) */ max(c.event_id)

from ar_receivable_applications_all ra, ar_cash_receipt_history_all c

WHERE he.event_id = ra.event_id AND ra.cash_receipt_history_id = c.cash_receipt_history_id ) AND crh.reversal_cash_receipt_hist_id = crh1.cash_receipt_history_id(+)