Oracle Sub-Ledger Accounting
DavidTaylor
29th June 2012
TechnicalOverview
Contents
1. Subsidiary Ledgers andGeneral Ledger
2. General Ledger
3. Sub-Ledgers (AP, AR, …)
4. Basic Transaction Accounting
5. View Accounting in Oracle eBs Suite
6. Sub-ledger toGL Transfer
7. Oracle GL toSub-ledger Drill-down
8. Oracle SLADataModel
9. SQL example: GL toAP Drill-down Query
10. Questions
1. Subsidiary Ledgers andGeneral Ledger
Oracle GL
• Journals
• JournalLines
Oracle AP
• SuppInvoices
• InvoiceLines
• InvoiceDistrib’s
• Payments
Oracle AR
• CustomerTrx
• TrxLines
• TrxDistrib’s
• Receipts
• Adjustments
Oracle Payroll Oracle FA
Oracle Sub-ledger Accounting(SLA)
Manual Journals
2. General Ledger
o GL is the “truth”,since statutory financial andmanagement reporting is based on GL data
o GL data structure is very simple…
o Journal Lines consist of:
• An amount (DRor CR)
• Atransaction currency
• Adate
• An account code combination
o …which mirrorsthe principal properties ofa GL set-of-books (or“Ledger”):
• Acurrency (known as the “functional” currency)
• Acalendar
• Achart-of-accounts (a scheme toclassify amounts of money moving around the business)
o Journal lines aregrouped together under JournalHeaders andJournalBatches
o By convention, a GL “amount” (or“balance”) is calculated as DRminus CR
o The GL amounts areshown in twosets ofcolumns:
• EnteredAmounts (in thetransactioncurrency)
• AccountedAmounts (in thefunctionalcurrency– i.e.theset-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 Asub-ledger is used…
• To manage transactional processing (e.g. recording and payment ofsupplier invoices)
• To assign GL account code combinations totransaction amounts (at transaction-distribution-level)
o Accounting information is transferred toGeneral Ledger tosupport financial statutory andmanagement reporting
4. BasicTransactionAccounting
o Accounts Payable (AP)
Transaction Level DR/ CR Account Type
Invoice Header CR Liability
Distribution DR Expense
Distribution DR Tax
CreditNote Header DR Liability
Distribution CR Expense
Distribution CR Tax
Prepayment Header CR Liability
Distribution DR PrepaidExpense
Distribution DR Tax
Payment Header DR Liability
Header CR CashClearing
Reconciled Payment Header DR CashClearing
Header CR Cash
BasicTransaction Accounting (cont)
o Accounts Receivable (AR)
Transaction Level DR/ CR Account Type
Invoice Header DR Receivables(TradeDebtors)
Distribution CR Revenue
Distribution CR Tax
CreditMemo Header CR Receivables(TradeDebtors)
Distribution DR Revenue
Distribution DR Tax
Adjustment Header CR Receivables(TradeDebtors)
Header DR WriteOff/BadDebt
Basic Transaction Accounting (cont)
o Accounts Receivable (AR), continued
Transaction Level DR/ CR Account Type
Misc CashReceipt Header CR Receivables(Activity)
Header DR CashClearing
Misc CashPayment Header DR Receivables(Activity)
Header CR CashClearing
CashReceipt Header DR CashClearing
Header CR Unidentified
Header orCR Unapplied
Header orCR OnAccount
Header orCR Receivables(TradeDebtors)
Reconciled CashReceipt Header CR CashClearing
Header DR Cash
5. View Accounting in OracleeBs 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 SLAhas proratedthe Liability amount across item andtax lines
6. Sub-ledger to GL Transfer
o Accounted amounts can be transferredto Oracle GL in Detail orSummary mode.
o InDetail mode:
• Each sub-ledger transaction header ordistribution is used tocreate a corresponding journal line
• There is aone-to-one relationship between the sub-ledger accounting entry, andthe GL journal line
• GL stores some ofthe sub-ledger transaction information (invoice number, etc) in the REFERENCE_x columns of
the GL_JE_LINES table
o InSummary mode
• For a given journalheader, a single journal line is created per unique account code combination
• There is amany-to-one relationship between the sub-ledger accounting entry, andthe GL journal line
• In this case, GL cannot store sub-ledger transaction information in the GL_JE_LINES table
• AGL report which relies on the REFERENCE_x columns ofthe GL_JE_LINES table cannot provide transaction info if
accounting is transferred toGL in Summary mode
• Detail transaction information can onlybe derived by connecting from GL tosub-ledger transaction tables
(AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, etc.)
7. OracleGL toSub-ledger Drill-down
o In R12 OracleeBs, drill-down fromGL toallsub-ledger modules (AP, AR, etc.) proceeds via Oracle Sub-Ledger Accounting
(SLA) database tables, in the XLA database schema.
o As partofthe R12 upgrade process, the XLA tables arepopulated forall R11 transactions.
o Beware! There may be some (old)historical transactions which are not in XLA.
OracleGL toSub-ledger Drill-down
o Resp: GL Administrator, Nav: Inquiry> Account. Click on “Show JournalDetails”, andthen on “Show Full Journal”:
OracleGL toSub-ledger Drill-down
o The Line Drilldownshows the multiple SLAlines corresponding tothe single GL journal line (since transfer toGL 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. OracleSLA Data Model
Oracle Sub Ledger (E.g.Payables) Oracle Sub Ledger Accounting (SLA) Oracle General Ledger
AP_INVOICE_LINES_ALL
GL_JE_LINESXLA_AE_HEADERS
XLA_DISTRIBUTION_LINKSAP_INVOICE_DISTRIBUTIONS_ALL
GL_JE_HEADERS
GL_JE_BATCHES
XLA_AE_LINES GL_IMPORT_REFERENCES
XLA_EVENTS
XLA.XLA_TRANSACTION_ENTITIESAP_INVOICES_ALL
SUMMARISED
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)
GL Jnl Lineto
ImportRefs
ImportRefs to
SLALine
SLALine to
SLAHeader
SLAHeaderto
TrxHeader
SLALine to
SLADist
SLADist to
TrxDist
OtherSLJoins
-- join GL journal line to SLA headers and lines
AND NVL(gir.je_batch_id,-1) = NVL(gjh.je_batch_id,-1)
AND gir.je_header_id = gjh.je_header_id
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
AND gcc.code_combination_id = xal.code_combination_id
AND xah.ae_header_id = xal.ae_header_id
AND xah.application_id = xal.application_id
AND xah.gl_transfer_status_code = 'Y'
-- join SLA header to subledger transaction header
AND xah.entity_id = xte.entity_id
AND xte.application_id = xah.application_id
AND xte.entity_code = 'AP_INVOICES'
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(+)
AND xal.ae_line_num = xdl.ae_line_num(+)
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
AND xdl.source_distribution_type(+) = 'AP_INV_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)
AND aia.org_id = NVL(aida.org_id,aia.org_id)
o The following transaction entities arecommonly used…
o All eBs entity codes, andtheir descriptions, arelisted in XLA_ENTITY_TYPES_TL.
o Mappings fromXLA_TRANSACTION_ENTITIES tosub-ledger transaction tables for allentity codes arelisted in
XLA_ENTITY_ID_MAPPINGS.
o AGL to Sub-ledger Drill-down report will requireone query per transaction entity, andthe separate queries joined by
UNION ALL.
XLA_TRANSACTION_ENTITIES
ENTITY_CODE SOURCE_ID_INT_1joins 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 The following distribution types arecommonly used…
o Ifthe XLA_DISTRIBUTION_LINKS table is used, all amounts should be taken from the UNROUNDED_ACCOUNTED_DR/
CRand UNROUNDED_ENTERED_DR / CRcolumns.
o Since some accounting does not originate fromtransaction distributions (such as INTRA orINTER company accounting),
the XLA_DISTRIBUTION_LINKS table should be outer-joined tothe main query.
XLA_DISTRIBUTION_LINKS
SOURCE_DISTRIBUTION_TYPE SOURCE_DISTRIBUTION_ID_NUM_1joins 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…
Questions, questions?

Oracle Sub-ledger Accounting : a Technical Overview

  • 1.
  • 2.
    Contents 1. Subsidiary LedgersandGeneral Ledger 2. General Ledger 3. Sub-Ledgers (AP, AR, …) 4. Basic Transaction Accounting 5. View Accounting in Oracle eBs Suite 6. Sub-ledger toGL Transfer 7. Oracle GL toSub-ledger Drill-down 8. Oracle SLADataModel 9. SQL example: GL toAP Drill-down Query 10. Questions
  • 3.
    1. Subsidiary LedgersandGeneral Ledger Oracle GL • Journals • JournalLines Oracle AP • SuppInvoices • InvoiceLines • InvoiceDistrib’s • Payments Oracle AR • CustomerTrx • TrxLines • TrxDistrib’s • Receipts • Adjustments Oracle Payroll Oracle FA Oracle Sub-ledger Accounting(SLA) Manual Journals
  • 4.
    2. General Ledger oGL is the “truth”,since statutory financial andmanagement reporting is based on GL data o GL data structure is very simple… o Journal Lines consist of: • An amount (DRor CR) • Atransaction currency • Adate • An account code combination o …which mirrorsthe principal properties ofa GL set-of-books (or“Ledger”): • Acurrency (known as the “functional” currency) • Acalendar • Achart-of-accounts (a scheme toclassify amounts of money moving around the business) o Journal lines aregrouped together under JournalHeaders andJournalBatches o By convention, a GL “amount” (or“balance”) is calculated as DRminus CR o The GL amounts areshown in twosets ofcolumns: • EnteredAmounts (in thetransactioncurrency) • AccountedAmounts (in thefunctionalcurrency– i.e.theset-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!
  • 5.
    3. Sub-Ledgers (AP,AR, …) o Asub-ledger is used… • To manage transactional processing (e.g. recording and payment ofsupplier invoices) • To assign GL account code combinations totransaction amounts (at transaction-distribution-level) o Accounting information is transferred toGeneral Ledger tosupport financial statutory andmanagement reporting
  • 6.
    4. BasicTransactionAccounting o AccountsPayable (AP) Transaction Level DR/ CR Account Type Invoice Header CR Liability Distribution DR Expense Distribution DR Tax CreditNote Header DR Liability Distribution CR Expense Distribution CR Tax Prepayment Header CR Liability Distribution DR PrepaidExpense Distribution DR Tax Payment Header DR Liability Header CR CashClearing Reconciled Payment Header DR CashClearing Header CR Cash
  • 7.
    BasicTransaction Accounting (cont) oAccounts Receivable (AR) Transaction Level DR/ CR Account Type Invoice Header DR Receivables(TradeDebtors) Distribution CR Revenue Distribution CR Tax CreditMemo Header CR Receivables(TradeDebtors) Distribution DR Revenue Distribution DR Tax Adjustment Header CR Receivables(TradeDebtors) Header DR WriteOff/BadDebt
  • 8.
    Basic Transaction Accounting(cont) o Accounts Receivable (AR), continued Transaction Level DR/ CR Account Type Misc CashReceipt Header CR Receivables(Activity) Header DR CashClearing Misc CashPayment Header DR Receivables(Activity) Header CR CashClearing CashReceipt Header DR CashClearing Header CR Unidentified Header orCR Unapplied Header orCR OnAccount Header orCR Receivables(TradeDebtors) Reconciled CashReceipt Header CR CashClearing Header DR Cash
  • 9.
    5. View Accountingin OracleeBs 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 SLAhas proratedthe Liability amount across item andtax lines
  • 10.
    6. Sub-ledger toGL Transfer o Accounted amounts can be transferredto Oracle GL in Detail orSummary mode. o InDetail mode: • Each sub-ledger transaction header ordistribution is used tocreate a corresponding journal line • There is aone-to-one relationship between the sub-ledger accounting entry, andthe GL journal line • GL stores some ofthe sub-ledger transaction information (invoice number, etc) in the REFERENCE_x columns of the GL_JE_LINES table o InSummary mode • For a given journalheader, a single journal line is created per unique account code combination • There is amany-to-one relationship between the sub-ledger accounting entry, andthe GL journal line • In this case, GL cannot store sub-ledger transaction information in the GL_JE_LINES table • AGL report which relies on the REFERENCE_x columns ofthe GL_JE_LINES table cannot provide transaction info if accounting is transferred toGL in Summary mode • Detail transaction information can onlybe derived by connecting from GL tosub-ledger transaction tables (AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, etc.)
  • 11.
    7. OracleGL toSub-ledgerDrill-down o In R12 OracleeBs, drill-down fromGL toallsub-ledger modules (AP, AR, etc.) proceeds via Oracle Sub-Ledger Accounting (SLA) database tables, in the XLA database schema. o As partofthe R12 upgrade process, the XLA tables arepopulated forall R11 transactions. o Beware! There may be some (old)historical transactions which are not in XLA.
  • 12.
    OracleGL toSub-ledger Drill-down oResp: GL Administrator, Nav: Inquiry> Account. Click on “Show JournalDetails”, andthen on “Show Full Journal”:
  • 13.
    OracleGL toSub-ledger Drill-down oThe Line Drilldownshows the multiple SLAlines corresponding tothe single GL journal line (since transfer toGL 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)
  • 14.
    8. OracleSLA DataModel Oracle Sub Ledger (E.g.Payables) Oracle Sub Ledger Accounting (SLA) Oracle General Ledger AP_INVOICE_LINES_ALL GL_JE_LINESXLA_AE_HEADERS XLA_DISTRIBUTION_LINKSAP_INVOICE_DISTRIBUTIONS_ALL GL_JE_HEADERS GL_JE_BATCHES XLA_AE_LINES GL_IMPORT_REFERENCES XLA_EVENTS XLA.XLA_TRANSACTION_ENTITIESAP_INVOICES_ALL SUMMARISED
  • 15.
    9. SQL: GLto 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'
  • 16.
    GL to APDrill-down Query (cont) GL Jnl Lineto ImportRefs ImportRefs to SLALine SLALine to SLAHeader SLAHeaderto TrxHeader SLALine to SLADist SLADist to TrxDist OtherSLJoins -- join GL journal line to SLA headers and lines AND NVL(gir.je_batch_id,-1) = NVL(gjh.je_batch_id,-1) AND gir.je_header_id = gjh.je_header_id 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 AND gcc.code_combination_id = xal.code_combination_id AND xah.ae_header_id = xal.ae_header_id AND xah.application_id = xal.application_id AND xah.gl_transfer_status_code = 'Y' -- join SLA header to subledger transaction header AND xah.entity_id = xte.entity_id AND xte.application_id = xah.application_id AND xte.entity_code = 'AP_INVOICES' 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(+) AND xal.ae_line_num = xdl.ae_line_num(+) 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 AND xdl.source_distribution_type(+) = 'AP_INV_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) AND aia.org_id = NVL(aida.org_id,aia.org_id)
  • 17.
    o The followingtransaction entities arecommonly used… o All eBs entity codes, andtheir descriptions, arelisted in XLA_ENTITY_TYPES_TL. o Mappings fromXLA_TRANSACTION_ENTITIES tosub-ledger transaction tables for allentity codes arelisted in XLA_ENTITY_ID_MAPPINGS. o AGL to Sub-ledger Drill-down report will requireone query per transaction entity, andthe separate queries joined by UNION ALL. XLA_TRANSACTION_ENTITIES ENTITY_CODE SOURCE_ID_INT_1joins 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
  • 18.
    o The followingdistribution types arecommonly used… o Ifthe XLA_DISTRIBUTION_LINKS table is used, all amounts should be taken from the UNROUNDED_ACCOUNTED_DR/ CRand UNROUNDED_ENTERED_DR / CRcolumns. o Since some accounting does not originate fromtransaction distributions (such as INTRA orINTER company accounting), the XLA_DISTRIBUTION_LINKS table should be outer-joined tothe main query. XLA_DISTRIBUTION_LINKS SOURCE_DISTRIBUTION_TYPE SOURCE_DISTRIBUTION_ID_NUM_1joins 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…
  • 19.