Monday, May 15, 2017

Automatic Reversal query for General Ledger Entries in Oracle Applications

SELECT, batch_name, journal_name,
   jh.status, jh.period_name, jh.accrual_rev_status,jh.accrual_rev_period_name
FROM gl.gl_je_headers jh,
   gl.gl_je_batches jb,
   gl.gl_autoreverse_options aro,
   gl.gl_ledgers led,
   gl.gl_je_categories_tl jc
WHERE aro.je_category_name = jh.je_category
AND jh.ledger_id = led.ledger_id
AND led.criteria_set_id = aro.criteria_set_id
AND jh.je_batch_id = jb.je_batch_id
AND aro.autoreverse_flag = 'Y'
AND jh.accrual_rev_period_name IS NULL
AND jh.accrual_rev_status IS  NULL
AND led.ledger_id = jh.ledger_id
AND jc.je_category_name = jh.je_category
and jh.period_name like '%2017'
order by jh.period_name;

No comments:

Post a Comment