Oracle Sub-ledger Accounting : a Technical Overview

19
Oracle Sub-Ledger Accounting David Taylor 29 th June 2012 Technical Overview

Transcript of Oracle Sub-ledger Accounting : a Technical Overview

Page 1: Oracle Sub-ledger Accounting : a Technical Overview

Oracle Sub-Ledger Accounting

David Taylor29th June 2012

Technical Overview

Page 2: Oracle Sub-ledger Accounting : a Technical Overview

Contents

1. Subsidiary Ledgers and General Ledger2. General Ledger3. Sub-Ledgers (AP, AR, …)4. Basic Transaction Accounting5. View Accounting in Oracle eBs Suite6. Sub-ledger to GL Transfer7. Oracle GL to Sub-ledger Drill-down8. Oracle SLA Data Model9. SQL example: GL to AP Drill-down Query 10. Questions

Page 3: Oracle Sub-ledger Accounting : a Technical Overview

1. Subsidiary Ledgers and General Ledger

Oracle GL• Journals• Journal

Lines

Oracle AP• Supp

Invoices• Invoice Lines• Invoice

Distrib’s• Payments

Oracle AR• Customer

Trx• Trx Lines• Trx Distrib’s• Receipts• Adjustments

Oracle Payroll

Oracle FA

Oracle Sub-ledger Accounting (SLA)

Manual Journals

Page 4: Oracle Sub-ledger Accounting : a Technical Overview

2. General Ledgero GL is the “truth”, since statutory financial and management reporting is based on GL

datao 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 Batcheso By convention, a GL “amount” (or “balance”) is calculated as DR minus CRo 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!

Page 5: Oracle Sub-ledger Accounting : a Technical Overview

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

Page 6: Oracle Sub-ledger Accounting : a Technical Overview

4. Basic Transaction Accountingo Accounts Payable (AP)Transaction Level DR / CR Account TypeInvoice Header CR Liability

Distribution DR ExpenseDistribution DR Tax

Credit Note Header DR LiabilityDistribution CR ExpenseDistribution CR Tax

Prepayment Header CR LiabilityDistribution DR Prepaid ExpenseDistribution DR Tax

Payment Header DR LiabilityHeader CR Cash Clearing

Reconciled Payment Header DR Cash ClearingHeader CR Cash

Page 7: Oracle Sub-ledger Accounting : a Technical Overview

Basic Transaction Accounting (cont)o Accounts Receivable (AR)

Transaction Level DR / CR Account TypeInvoice Header DR Receivables (Trade Debtors)

Distribution CR RevenueDistribution CR Tax

Credit Memo Header CR Receivables (Trade Debtors)Distribution DR RevenueDistribution DR Tax

Adjustment Header CR Receivables (Trade Debtors)Header DR Write Off/Bad Debt

Page 8: Oracle Sub-ledger Accounting : a Technical Overview

Basic Transaction Accounting (cont)o Accounts Receivable (AR), continued

Transaction Level DR / CR Account TypeMisc Cash Receipt Header CR Receivables (Activity)

Header DR Cash ClearingMisc Cash Payment Header DR Receivables (Activity)

Header CR Cash ClearingCash Receipt Header DR Cash Clearing

Header CR UnidentifiedHeader or CR UnappliedHeader or CR On AccountHeader or CR Receivables (Trade Debtors)

Reconciled Cash Receipt Header CR Cash ClearingHeader DR Cash

Page 9: Oracle Sub-ledger Accounting : a Technical Overview

5. View Accounting in Oracle eBs Suiteo 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

Page 10: Oracle Sub-ledger Accounting : a Technical Overview

6. Sub-ledger to GL Transfero 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.)

Page 11: Oracle Sub-ledger Accounting : a Technical Overview

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.

Page 12: Oracle Sub-ledger Accounting : a Technical Overview

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”:

Page 13: Oracle Sub-ledger Accounting : a Technical Overview

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)

Page 14: Oracle Sub-ledger Accounting : a Technical Overview

8. Oracle SLA 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_LINKS

AP_INVOICE_DISTRIBUTIONS_ALL

GL_JE_HEADERS

GL_JE_BATCHES

XLA_AE_LINES GL_IMPORT_REFERENCES

XLA_EVENTS

XLA.XLA_TRANSACTION_ENTITIES

AP_INVOICES_ALL

SUMMARISED

Page 15: Oracle Sub-ledger Accounting : a Technical Overview

9. SQL: GL to AP Drill-down QuerySELECT *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 aiaWHERE 1 = 1-- identify GL journal linesAND gps.application_id = 101AND gps.ledger_id = 1AND gps.effective_period_num >= &P_EFF_PERIOD_NUM_FROMAND gps.effective_period_num <= &P_EFF_PERIOD_NUM_TOAND gjb.je_batch_id = gjh.je_batch_idAND gjh.period_name = gps.period_nameAND gjh.ledger_id = gps.ledger_idAND gjh.status = 'P'AND gjh.actual_flag = 'A'AND gjh.je_source = 'Payables'AND gjcv.je_category_key(+) = gjh.je_categoryAND gjh.je_header_id = gjl.je_header_idAND gjl.code_combination_id = gcc.code_combination_idAND gcc.summary_flag = 'N'

Page 16: Oracle Sub-ledger Accounting : a Technical Overview

GL to AP Drill-down Query (cont)

GL Jnl Line toImport Refs

Import Refs to SLA Line

SLA Line toSLA Header

SLA Header toTrx Header

SLA Line toSLA Dist

SLA Dist toTrx Dist

Other SL Joins

-- join GL journal line to SLA headers and linesAND NVL(gir.je_batch_id,-1) = NVL(gjh.je_batch_id,-1)AND gir.je_header_id = gjh.je_header_idAND gir.je_line_num = gjl.je_line_numAND gir.gl_sl_link_table = xal.gl_sl_link_tableAND gir.gl_sl_link_id = xal.gl_sl_link_idAND gcc.code_combination_id = xal.code_combination_idAND xah.ae_header_id = xal.ae_header_idAND xah.application_id = xal.application_idAND xah.gl_transfer_status_code = 'Y'-- join SLA header to subledger transaction headerAND xah.entity_id = xte.entity_idAND xte.application_id = xah.application_idAND xte.entity_code = 'AP_INVOICES'AND aia.invoice_id = xte.source_id_int_1-- join SLA line to SLA distributions, if they existAND 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 distributionAND xdl.source_distribution_type(+) = 'AP_INV_DIST'AND xdl.source_distribution_id_num_1 = aida.invoice_distribution_id(+)-- join to other subledger transaction informationAND aia.invoice_id = NVL(aida.invoice_id,aia.invoice_id)AND aia.org_id = NVL(aida.org_id,aia.org_id)

Page 17: Oracle Sub-ledger Accounting : a Technical Overview

o The following transaction entities are commonly used…

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_TRANSACTION_ENTITIES

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

Page 18: Oracle Sub-ledger Accounting : a Technical Overview

o The following distribution types are commonly used…

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.

XLA_DISTRIBUTION_LINKS

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…

Page 19: Oracle Sub-ledger Accounting : a Technical Overview

Questions, questions?