You are on page 1of 19

Oracle Sub-Ledger Accounting

Technical Overview

David Taylor
29th June 2012
Contents

1. Subsidiary Ledgers and General Ledger


2. General Ledger
3. Sub-Ledgers (AP, AR, …)
4. Basic Transaction Accounting
5. View Accounting in Oracle eBs Suite
6. Sub-ledger to GL Transfer
7. Oracle GL to Sub-ledger Drill-down
8. Oracle SLA Data Model
9. SQL example: GL to AP Drill-down Query
10. Questions
1. Subsidiary Ledgers and General Ledger

Oracle GL
• Journals
• Journal Lines Manual Journals

Oracle Sub-ledger Accounting (SLA)

Oracle AP Oracle AR Oracle Payroll Oracle FA


• Supp Invoices • Customer Trx
• Invoice Lines • Trx Lines
• Invoice Distrib’s • Trx Distrib’s
• Payments • Receipts
• Adjustments
2. General Ledger
o GL is the “truth”, since statutory financial and management reporting is based on GL data
o GL data structure is very simple…
o Journal Lines consist of:
• An amount (DR or CR)
• A transaction currency
• A date
• An account code combination
o …which mirrors the principal properties of a GL set-of-books (or “Ledger”):
• A currency (known as the “functional” currency)
• A calendar
• A chart-of-accounts (a scheme to classify amounts of money moving around the business)
o Journal lines are grouped together under Journal Headers and Journal Batches
o By convention, a GL “amount” (or “balance”) is calculated as DR minus CR
o The GL amounts are shown in two sets of columns:
• Entered Amounts (in the transaction currency)
• Accounted Amounts (in the functional currency – i.e. the set-of-books, or “ledger”, currency)
o GL reports should always display amounts in the functional currency.
o Never perform exchange rate calculations in a custom report!
3. Sub-Ledgers (AP, AR, …)
o A sub-ledger is used…
• To manage transactional processing (e.g. recording and payment of supplier invoices)
• To assign GL account code combinations to transaction amounts (at transaction-distribution-level)

o Accounting information is transferred to General Ledger to support financial statutory and management reporting
4. Basic Transaction Accounting
o Accounts Payable (AP)
Transaction Level DR / CR Account Type
Invoice Header CR Liability
Distribution DR Expense
Distribution DR Tax
Credit Note Header DR Liability
Distribution CR Expense
Distribution CR Tax
Prepayment Header CR Liability
Distribution DR Prepaid Expense
Distribution DR Tax
Payment Header DR Liability
Header CR Cash Clearing
Reconciled Payment Header DR Cash Clearing
Header CR Cash
Basic Transaction Accounting (cont)
o Accounts Receivable (AR)
Transaction Level DR / CR Account Type
Invoice Header DR Receivables (Trade Debtors)
Distribution CR Revenue
Distribution CR Tax
Credit Memo Header CR Receivables (Trade Debtors)
Distribution DR Revenue
Distribution DR Tax
Adjustment Header CR Receivables (Trade Debtors)
Header DR Write Off/Bad Debt
Basic Transaction Accounting (cont)
o Accounts Receivable (AR), continued
Transaction Level DR / CR Account Type
Misc Cash Receipt Header CR Receivables (Activity)
Header DR Cash Clearing
Misc Cash Payment Header DR Receivables (Activity)
Header CR Cash Clearing
Cash Receipt Header DR Cash Clearing
Header CR Unidentified
Header or CR Unapplied
Header or CR On Account
Header or CR Receivables (Trade Debtors)
Reconciled Cash Receipt Header CR Cash Clearing
Header DR Cash
5. View Accounting in Oracle eBs Suite
o When viewing the sub-ledger transaction, use the “Tools” or “Reports” menu.
o E.g. for an AP invoice, with the following invoice distributions…

o Reports > View Accounting…

Note: Oracle SLA has prorated the Liability amount across item and tax lines
6. Sub-ledger to GL Transfer
o Accounted amounts can be transferred to Oracle GL in Detail or Summary mode.
o In Detail mode:
• Each sub-ledger transaction header or distribution is used to create a corresponding journal line
• There is a one-to-one relationship between the sub-ledger accounting entry, and the GL journal line
• GL stores some of the sub-ledger transaction information (invoice number, etc) in the REFERENCE_x columns of
the GL_JE_LINES table

o In Summary mode
• For a given journal header, a single journal line is created per unique account code combination
• There is a many-to-one relationship between the sub-ledger accounting entry, and the GL journal line
• In this case, GL cannot store sub-ledger transaction information in the GL_JE_LINES table
• A GL report which relies on the REFERENCE_x columns of the GL_JE_LINES table cannot provide transaction info if
accounting is transferred to GL in Summary mode
• Detail transaction information can only be derived by connecting from GL to sub-ledger transaction tables
(AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, etc.)
7. Oracle GL to Sub-ledger Drill-down

o In R12 Oracle eBs, drill-down from GL to all sub-ledger modules (AP, AR, etc.) proceeds via Oracle Sub-Ledger Accounting
(SLA) database tables, in the XLA database schema.

o As part of the R12 upgrade process, the XLA tables are populated for all R11 transactions.

o Beware! There may be some (old) historical transactions which are not in XLA.
Oracle GL to Sub-ledger Drill-down

o Resp: GL Administrator, Nav: Inquiry > Account. Click on “Show Journal Details”, and then on “Show Full Journal”:
Oracle GL to Sub-ledger Drill-down

o The Line Drilldown shows the multiple SLA lines corresponding to the single GL journal line (since transfer to GL was
carried out in Summary mode):

o The View Transaction button takes the user to the Sub-Ledger transaction which generated the accounting line (an AP
Invoice, in this case)
8. Oracle SLA Data Model

Oracle Sub Ledger (E.g. Payables) Oracle Sub Ledger Accounting (SLA) Oracle General Ledger

AP_INVOICES_ALL XLA.XLA_TRANSACTION_ENTITIES GL_JE_BATCHES

XLA_EVENTS GL_JE_HEADERS

XLA_AE_HEADERS GL_JE_LINES

SUMMARISED

AP_INVOICE_LINES_ALL XLA_AE_LINES GL_IMPORT_REFERENCES

AP_INVOICE_DISTRIBUTIONS_ALL XLA_DISTRIBUTION_LINKS
9. SQL: GL to AP Drill-down Query

SELECT *
FROM gl_je_batches gjb
, gl_je_headers gjh
, gl_je_lines gjl
, gl_period_statuses gps
, gl_code_combinations gcc
, gl_import_references gir
, xla_ae_lines xal
, xla_ae_headers xah
, xla.xla_transaction_entities xte -- must use XLA base table, not APPS synonym
, xla_distribution_links xdl
, ap_invoice_distributions_all aida
, ap_invoices_all aia
WHERE 1 = 1
-- identify GL journal lines
AND gps.application_id = 101
AND gps.ledger_id = 1
AND gps.effective_period_num >= &P_EFF_PERIOD_NUM_FROM
AND gps.effective_period_num <= &P_EFF_PERIOD_NUM_TO
AND gjb.je_batch_id = gjh.je_batch_id
AND gjh.period_name = gps.period_name
AND gjh.ledger_id = gps.ledger_id
AND gjh.status = 'P'
AND gjh.actual_flag = 'A'
AND gjh.je_source = 'Payables'
AND gjcv.je_category_key(+) = gjh.je_category
AND gjh.je_header_id = gjl.je_header_id
AND gjl.code_combination_id = gcc.code_combination_id
AND gcc.summary_flag = 'N'
GL to AP Drill-down Query (cont)

-- join GL journal line to SLA headers and lines


AND NVL(gir.je_batch_id,-1) = NVL(gjh.je_batch_id,-1) GL Jnl Line to
AND gir.je_header_id = gjh.je_header_id Import Refs
AND gir.je_line_num = gjl.je_line_num
AND gir.gl_sl_link_table = xal.gl_sl_link_table
AND gir.gl_sl_link_id = xal.gl_sl_link_id
Import Refs to
AND gcc.code_combination_id = xal.code_combination_id SLA Line
AND xah.ae_header_id = xal.ae_header_id
SLA Line to
AND xah.application_id = xal.application_id
AND xah.gl_transfer_status_code = 'Y' SLA Header
-- join SLA header to subledger transaction header
AND xah.entity_id = xte.entity_id SLA Header to
AND xte.application_id = xah.application_id
AND xte.entity_code = 'AP_INVOICES'
Trx Header
AND aia.invoice_id = xte.source_id_int_1
-- join SLA line to SLA distributions, if they exist
AND xal.ae_header_id = xdl.ae_header_id(+) SLA Line to
AND xal.ae_line_num = xdl.ae_line_num(+)
SLA Dist
AND xal.application_id = xdl.application_id(+)
AND xah.event_id = NVL(xdl.event_id,xah.event_id)
-- join SLA distribution to subledger tranaction distribution SLA Dist to
AND xdl.source_distribution_type(+) = 'AP_INV_DIST'
Trx Dist
AND xdl.source_distribution_id_num_1 = aida.invoice_distribution_id(+)
-- join to other subledger transaction information
AND aia.invoice_id = NVL(aida.invoice_id,aia.invoice_id) Other SL Joins
AND aia.org_id = NVL(aida.org_id,aia.org_id)
XLA_TRANSACTION_ENTITIES
o The following transaction entities are commonly used…

ENTITY_CODE SOURCE_ID_INT_1 joins to…


AP_INVOICES AP_INVOICES_ALL.INVOICE_ID
AP_PAYMENTS AP_CHECKS_ALL.CHECK_ID
TRANSACTIONS RA_CUSTOMER_TRX_ALL.CUSTOMER_TRX_ID
RECEIPTS AR_CASH_RECEIPTS_ALL.CASH_RECEIPT_ID
ADJUSTMENTS AR_ADJUSTMENTS_ALL.ADJUSTMENT_ID
DEPRECIATION FA_BOOKS.ASSET_ID
ASSIGNMENTS PAY_ASSIGNMENT_ACTIONS.ASSIGNMENT_ACTION_ID

o All eBs entity codes, and their descriptions, are listed in XLA_ENTITY_TYPES_TL.
o Mappings from XLA_TRANSACTION_ENTITIES to sub-ledger transaction tables for all entity codes are listed in
XLA_ENTITY_ID_MAPPINGS.
o A GL to Sub-ledger Drill-down report will require one query per transaction entity, and the separate queries joined by
UNION ALL.
XLA_DISTRIBUTION_LINKS
o The following distribution types are commonly used…

SOURCE_DISTRIBUTION_TYPE SOURCE_DISTRIBUTION_ID_NUM_1 joins to…


AP_INV_DIST AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_DISTRIBUTION_ID(+)
AP_PMT_DIST AP_PAYMENT_HIST_DISTS.PAYMENT_HIST_DIST_ID(+)
RA_CUST_TRX_LINE_GL_DIST_ALL RA_CUST_TRX_LINE_GL_DIST_ALL.CUST_TRX_LINE_GL_DIST_ID(+)
AR_DISTRIBUTIONS_ALL AR_DISTRIBUTIONS_ALL.LINE_ID(+)
More…

o If the XLA_DISTRIBUTION_LINKS table is used, all amounts should be taken from the UNROUNDED_ACCOUNTED_DR /
CR and UNROUNDED_ENTERED_DR / CR columns.
o Since some accounting does not originate from transaction distributions (such as INTRA or INTER company accounting),
the XLA_DISTRIBUTION_LINKS table should be outer-joined to the main query.
Questions, questions?

You might also like