Search Results get_imported_rates




Overview

PA_MC_CURRENCY_PKG is a multi-currency (MRC) utility package in the Oracle Projects (PA) application, owned by APPS and declared with AUTHID CURRENT_USER. In Oracle EBS 12.1.1 and 12.2.2, it provides the currency conversion, rounding, and reporting set-of-books resolution services required by the Projects suite when transactions span multiple ledgers in a multiple reporting currencies configuration. The package exposes a small set of general-purpose helpers — currency rounding, functional currency lookup, set-of-books derivation, and MRC set-of-books type code resolution — alongside a broader set of cost and revenue rate/amount extraction routines used by the Projects costing and invoicing engines. The get_mrc_sob_type_code function, which is the subject of the user's search, returns the MRC reporting set-of-books type code (for example the distinction between a primary set of books and a reporting set of books) for a given set of books or for the current environment, allowing callers to branch logic based on whether they are operating against a primary or secondary ledger.

Key Procedures and Functions

  • CURRROUND — Rounds an amount according to the currency's defined precision, defaulting to the session functional currency when no code is supplied; declared with RESTRICT_REFERENCES (WNPS, WNDS).
  • FUNCTIONAL_CURRENCY — Returns the functional currency code for a supplied operating unit (org_id).
  • SET_OF_BOOKS — Overloaded function returning the set of books identifier either for a given org_id or for the current session context.
  • GET_MRC_SOB_TYPE_CODE — Overloaded function returning the MRC set-of-books type code, either for an explicitly supplied set_of_books_id or for the ambient environment. Both forms carry RESTRICT_REFERENCES assertions, confirming they are read-only and side-effect free.
  • EIID_DETAILS — Returns descriptive attributes of an expenditure item identifier (original transaction reference, adjustment item, linkage, expenditure item date, and transaction source), including error stack, stage, and code output parameters for diagnostic handling.
  • MAX_COST_LINE, MAX_REV_LINE, MAX_CRDL_AMTS — Retrieve maximum cost, revenue, and cost distribution line amounts used in multi-currency amount derivation.
  • GET_ORIG_COST_RATES, GET_ORIG_EI_COST_RATES, GET_ORIG_REV_RATES, GET_ORIG_EI_MC_RATES, GET_IMPORTED_RATES — Extract original, expenditure-item-specific, and imported conversion rates for cost and revenue processing.
  • GET_COST_AMTS, GET_MAX_COST_AMTS, GET_ORIG_EVENT_AMTS — Return converted cost and event amounts, including maximum and original event variants.
  • GET_AP_KEYS, GET_AP_RATE — Resolve Accounts Payable invoice keys and AP conversion rates used when Projects interfaces with Payables for multi-currency invoice processing.
  • SUM_REV_RDL, SUM_INV — Aggregate revenue distribution lines and invoice amounts.

Tables Accessed

Documented references include FND_CURRENCIES (currency precision and definitions), AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS, AP_INVOICE_DISTRIBUTIONS_ALL, AP_INVOICE_PAYMENTS, and AP_MC_INVOICE_DISTS (Payables invoice and MRC distribution data). Projects-side tables include PA_CC_DIST_LINES_ALL, PA_COST_DISTRIBUTION_LINES_ALL, PA_CUST_EVENT_RDL_ALL, PA_DRAFT_INVOICES, PA_DRAFT_INVOICE_DETAILS_ALL, PA_DRAFT_INVOICE_ITEMS, PA_EVENTS, PA_EXPENDITURE_ITEMS_ALL, and PA_IMPLEMENTATIONS. These support cost distribution, revenue distribution, event, draft invoice, and implementation-context lookups. Access is via APPS synonyms.

Usage Notes

The package is invoked from Oracle Projects forms, concurrent programs, and other PL/SQL packages (it is referenced by eight packages) whenever currency conversion, rounding, or MRC set-of-books classification is required. Because both GET_MRC_SOB_TYPE_CODE overloads are marked pure, they may be called safely from SQL and from restricted contexts. Custom code should call the org_id or set_of_books_id overloads explicitly rather than relying on session defaults, and should not assume behavior in a non-MRC implementation, where a secondary set-of-books type code may not exist.