SQL Queries

Query to Link AP Invoices, Payments, GL and SLA Tables: R12 AP GL XLA

SELECT          /*+ Index(xdl XLA_DISTRIBUTION_LINKS_N3) */       DISTINCT gjh.doc_sequence_value gl_vou_num, ac.check_id, xal.source_id,                aipa.invoice_payment_id, gjl.effective_date accounting_date,                xal.accounted_dr, xal.accounted_cr, aps.segment1 vendor_code,                aps.vendor_name vendor_name, aipa.invoice_id, aia.invoice_num,                aia.invoice_date, aia.invoice_currency_code cur,                aia.invoice_amount inv_amt_frc,                aia.exchange_rate inv_exc_rate,                aia.exchange_date inv_exc_date,               …

Read More

Query to Link AP Payments, GL and SLA Tables: R12 AP GL XLA

SELECT   SUM (xal.accounted_cr), SUM (xal.accounted_dr), aia.invoice_amount,         invoice_num    FROM ap_invoices_all aia,         ap_invoice_payments_all aipa,         ap_checks_all aca,         xla.xla_transaction_entities xte,         xla_ae_headers xah,         xla_ae_lines xal,         gl.gl_import_references gir,         gl_je_lines gjl,         gl_je_headers gjh   WHERE 1 = 1    …

Read More

Query to Link AP Invoices, GL and SLA Tables: R12 AP GL XLA

SELECT   SUM (xal.accounted_cr), SUM (xal.accounted_dr), aia.invoice_amount,         invoice_num    FROM ap_invoices_all aia,         xla.xla_transaction_entities xte,         xla_ae_headers xah,         xla_ae_lines xal,         gl.gl_import_references gir,         gl_je_lines gjl,         gl_je_headers gjh   WHERE 1 = 1     AND aia.invoice_id = NVL…

Read More