Query to get AR invoice SLA and GL details

Query to get AR invoice SLA and GL details
AR Transaction Subledger and general ledger details
Oracle receivable subledger accounting and general ledger link
Oracle apps AR SLA and gl details

--Query to get AR invoice SLA and GL details

SELECT rct.trx_number,
       b.name        batch_name,
       h.name        journal_name,
       b.description batch_description,
       h.je_category,
       h.je_source,
       h.period_name je_period_name,
       h.status      journal_status,
       h.description je_description,
       l.je_line_num line_number,
       l.accounted_dr,
       l.accounted_cr,
       rct.customer_trx_id,
       rctd.cust_trx_line_gl_dist_id,
       xal.entered_dr,
       xal.entered_cr,
       xal.accounting_class_code,
       xal.code_combination_id,
       xah.event_id,
       xal.ae_header_id,
       xlate.entity_code,
       h.je_category
  FROM apps.gl_je_batches           b,
       apps.gl_je_headers           h,
       apps.gl_je_lines             l,
       apps.gl_import_references    gir,
       ra_customer_trx_all          rct,
       ra_cust_trx_line_gl_dist_all rctd,
       xla_ae_headers               xah,
       xla_ae_lines                 xal,
       xla_events                   xet,
       xla_distribution_links       xdl,
       xla.xla_transaction_entities xlate
 WHERE     h.je_header_id(+) = l.je_header_id
       AND l.je_header_id(+) = gir.je_header_id
       AND l.je_line_num(+) = gir.je_line_num
       AND gir.je_batch_id = b.je_batch_id(+)
       AND gir.gl_sl_link_table(+) = xal.gl_sl_link_table
       AND gir.gl_sl_link_id(+) = xal.gl_sl_link_id
       AND xal.ae_header_id = xah.ae_header_id
       AND xet.event_id = xah.event_id
       AND xdl.event_id = xet.event_id
       AND xdl.ae_header_id = xah.ae_header_id
       AND xdl.ae_line_num = xal.ae_line_num
       AND xdl.application_id = 222
       -- AND xdl.source_distribution_type IN
       -- ('RA_CUST_TRX_LINE_GL_DIST_ALL', 'MFAR_DISTRIBUTIONS_ALL')
       AND xlate.entity_code = 'TRANSACTIONS'
       AND h.je_source(+) = 'Receivables'
--       AND h.je_category(+) = 'Credit Memos'
       AND xet.entity_id = xlate.entity_id
       AND xet.application_id = xlate.application_id
       AND rct.customer_trx_id = xlate.source_id_int_1
       AND xdl.source_distribution_id_num_1 = rctd.cust_trx_line_gl_dist_id
       AND rct.customer_trx_id = rctd.customer_trx_id
       AND rct.trx_number = '123123';
Related posts: Upload your own post and refer it anywhere anytime:

Leave a Reply