0% found this document useful (0 votes)
573 views

Oracle AR SLA Queries

The document provides SQL queries to retrieve data from AR tables for transactions, adjustments, miscellaneous receipts, and cash receipts. The queries join several tables, including the application interface tables, to retrieve transaction details along with accounting distribution information. Parameters are used to filter the results by transaction number, adjustment ID, or receipt ID.

Uploaded by

utkarh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
573 views

Oracle AR SLA Queries

The document provides SQL queries to retrieve data from AR tables for transactions, adjustments, miscellaneous receipts, and cash receipts. The queries join several tables, including the application interface tables, to retrieve transaction details along with accounting distribution information. Parameters are used to filter the results by transaction number, adjustment ID, or receipt ID.

Uploaded by

utkarh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

AR SLA Queries for PSA tables

Below are the queries for AR. Pass on to the team members if anyone needs they can
use for remediating AR objects.

-- AR Transactions

SELECT rct.trx_number,
rct.customer_trx_id,
rctd.cust_trx_line_gl_dist_id,
xal.entered_dr,
xal.entered_cr,
xal.code_combination_id,
xah.event_id,
xal.ae_header_id
FROM ra_customer_trx_all rct,
ra_customer_trx_lines_all rctl,
ra_cust_trx_line_gl_dist_all rctd,
xla_ae_headers xah,
xla_ae_lines xal,
xla_events xet,
xla_distribution_links xdl
WHERE 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 xdl.source_distribution_id_num_1 = rctd.CUST_TRX_LINE_GL_DIST_ID
AND rctl.customer_trx_line_id = rctd.customer_trx_line_id
AND rct.customer_trx_id = rctl.customer_trx_id
AND rct.trx_number = :p_trx_number;

-- AR adjustments

SELECT rct.trx_number,
adj.customer_trx_id,
adj.adjustment_id,
xal.entered_dr,
xal.entered_cr,
xal.code_combination_id,
xah.event_id,
xal.ae_header_id
FROM ra_customer_trx_all rct,
ar_adjustments_all adj,
ar_distributions_all ard,
xla_ae_headers xah,
xla_ae_lines xal,
xla_events xet,
xla_distribution_links xdl
WHERE 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 ('AR_DISTRIBUTIONS_ALL',
'MFAR_DISTRIBUTIONS_ALL')
AND xdl.source_distribution_id_num_1 = ard.line_id
AND ard.source_table = 'ADJ'
AND ard.source_id = adj.adjustment_id
AND adj.adjustment_id = :p_adj_id
AND rct.customer_trx_id = adj.customer_trx_id
AND rct.trx_number = :p_trx_number;

-- Misc Receipts

SELECT cr.receipt_number,
cr.cash_receipt_id,
arm.misc_cash_distribution_id,
xal.entered_dr,
xal.entered_cr,
xal.code_combination_id,
xah.event_id,
xal.ae_header_id
FROM ar_cash_receipts_all cr,
ar_misc_cash_distributions_all arm,
ar_distributions_all ard,
xla_ae_headers xah,
xla_ae_lines xal,
xla_events xet,
xla_distribution_links xdl
WHERE 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.source_distribution_type IN ('AR_DISTRIBUTIONS_ALL',
'MFAR_DISTRIBUTIONS_ALL')
AND xdl.source_distribution_id_num_1 = ard.line_id
AND ard.source_id = arm.misc_cash_distribution_id
AND ard.source_table = 'MCD'
AND xdl.application_id = 222
AND arm.cash_receipt_id = cr.cash_receipt_id
AND cr.cash_receipt_id = :receipt_id;

-- CASH Receipts

SELECT cr.receipt_number,
cr.cash_receipt_id,
arp.receivable_application_id,
xal.entered_dr,
xal.entered_cr,
xal.code_combination_id,
xah.event_id,
xal.ae_header_id
FROM ar_cash_receipts_all cr,
ar_receivable_applications_all arp,
ar_distributions_all ard,
xla_ae_headers xah,
xla_ae_lines xal,
xla_events xet,
xla_distribution_links xdl,
gl_code_combinations gcc
WHERE 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.source_distribution_type IN ('AR_DISTRIBUTIONS_ALL',
'MFAR_DISTRIBUTIONS_ALL')
AND xdl.source_distribution_id_num_1 = ard.line_id
AND ard.source_id = arp.receivable_application_id
AND ard.source_table = 'RA'
AND xdl.application_id = 222
AND arp.cash_receipt_id = cr.cash_receipt_id
AND cr.cash_receipt_id = :receipt_id
AND gcc.code_combination_id = xal.code_combination_id
AND gcc.segment1 != '00000000000000'

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy