Oracle Cloud ERP – Query to extract GL Batches, Journal Headers and Lines Details

SELECT
gl.name ledger_name,
to_char(gjh.default_effective_date, 'YYYY/MM/DD') effective_date_of_transaction,
gjh.currency_code currency_code,
gjh.actual_flag actual_flag,
gcc.segment1,
gcc.segment2,
gcc.segment3,
gcc.segment4,
gcc.segment5,
gcc.segment6,
gcc.segment7,
gjl.entered_dr entered_debit_amount,
gjl.entered_cr entered_credit_amount,
gjl.accounted_dr converted_debit_amount,
gjl.accounted_cr converted_credit_amount,
gjb.name batch_name,
gjh.description,
gjl.stat_amount statistical_amount,
gjh.currency_conversion_date currency_conversion_date ,
gjl.je_line_num gl_line_num,
gjh.status,
gjb.created_by,
gjb.creation_date ,
gjh.JE_SOURCE,
gjh.period_name,
gjh.JE_CATEGORY
FROM
gl_je_lines gjl,
gl_je_headers gjh,
gl_je_batches gjb,
gl_code_combinations gcc,
gl_ledgers gl
WHERE
gjb.je_batch_id = gjh.je_batch_id
AND gjl.je_header_id = gjh.je_header_id
AND gjh.je_batch_id = gjb.je_batch_id
AND gjl.code_combination_id = gcc.code_combination_id
AND gjh.ledger_id = gl.ledger_id
ORDER BY
gjh.je_batch_id,
gjh.name,
gjl.je_line_num

Leave a Reply

Your email address will not be published.