Friday, October 22, 2010

Data Flow between Receiving Transactions (RCV) – Sub ledger Accounting (XLA) – General Ledger (GL)

When I tried to understand the flow of data between PO transactions to GL, I found the below and sharing the same. All the queries used below were tested in R12.1.1 instance. 

Collecting the Receiving data related to PO

SELECT rrsl.rcv_sub_ledger_id -- Connects to SLA tables
      ,rrsl.reference2   PO_HEADER_ID
      ,rrsl.reference3   PO_DISTRIBUTION_ID
FROM   rcv_receiving_sub_ledger rrsl
      ,rcv_transactions rt
      ,po_distributions_all pd
WHERE pd.po_distribution_id = rt.PO_DISTRIBUTION_ID
AND   rt.transaction_id = rrsl.rcv_transaction_id
AND   rt.PO_DISTRIBUTION_ID = rrsl.reference3
AND   rt.po_header_id = 500;

Collecting the data from XLA
In R12, we have XLA tables that holds link between any sub ledger data to General ledger data.
The below query gives you the important columns available in the XLA tables and GL linking columns for the above RCV_SUB_LEDGER_ID

SELECT xal.gl_sl_link_id     -- Connects to GL tables
      ,xal.gl_sl_link_table  -- Connects to GL tables
      ,xdl.source_dIstribution_id_num_1 rcv_sub_ledger_id
FROM   xla_events               xev
      ,xla_ae_headers           xah
      ,xla_ae_lines             xal
WHERE xah.application_id    = xev.application_id
AND   xev.event_id          = xah.event_id
AND xal.application_id    = xah.application_id
AND xal.ae_header_id      = xah.ae_header_id
AND xev.application_id    = xdl.application_id
AND xal.ae_line_num       = xdl.ae_line_num
AND xah.ae_header_id      = xdl.ae_header_id
AND xdl.source_dIstribution_id_num_1   = 3002;

Collecting the data from GL
Below query collects the data from GL.
In the below query, you can notice the linking columns in the first five places and others were just important ones.

SELECT glimp.reference_5 ENTITY_ID
      ,glimp.reference_6 EVENT_ID
      ,glimp.reference_7 AE_HEADER_ID
FROM   gl_import_references glimp
      ,gl_je_batches glb
      ,gl_je_headers glh
      ,gl_je_lines   gll
WHERE  glimp.je_header_id     = glh.je_header_id
AND    glimp.je_line_num      = gll.je_line_num
AND    glimp.je_batch_id      = glb.je_batch_id
AND    glh.je_header_id       = gll.je_header_id
AND    glh.je_batch_id        = glb.je_batch_id
AND    glimp.gl_sl_link_id    = 245133         
AND    glimp.gl_sl_link_table = 'XLAJEL';

0 Responses to “Data Flow between Receiving Transactions (RCV) – Sub ledger Accounting (XLA) – General Ledger (GL)”

Post a Comment


The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.