Search Results p_sob_id




Overview

The APPS.AP_SRS_ACCTG_CURR_V view is a reporting and integration object in Oracle E-Business Suite, defined in the APPS schema. It exposes a consolidated list of accounting ledgers together with their functional currency, ledger name, ledger identifier, and a related parent (source) ledger identifier. Its principal role is to support Oracle Subledger Accounting (SLA) and Payables reporting processes that must determine the correct accounting currency for a given ledger, including the Multi-Reporting Currency (MRC) relationships configured between a primary ledger and its reporting ledgers. The view is particularly relevant to parameter-driven concurrent programs and reports in the Payables and Subledger Accounting modules that accept a ledger identifier, commonly surfaced to the user as the parameter p_sob_id.

Underlying Base Objects

According to the documented ETRM metadata, the view is defined over two referenced base objects, both themselves views:

  • GL_ALC_LEDGER_RSHIPS_V — provides the ledger relationship records, including source ledger, reporting ledger, relationship type, and enablement status.
  • GL_SETS_OF_BOOKS — provides the ledger/Set of Books definition, including the ledger name, ledger identifier, and functional currency.

The definition is a UNION of two SELECT statements. The first branch selects from GL_ALC_LEDGER_RSHIPS_V, filtered to RELATIONSHIP_TYPE_CODE = 'SUBLEDGER', RELATIONSHIP_ENABLED_FLAG = 'Y', and APPLICATION_ID = 200 (the Payables application identifier). This branch produces the reporting-ledger rows derived from MRC relationships. The second branch selects directly from GL_SETS_OF_BOOKS, returning each ledger's own currency, name, and identifier, with a P_SOB_ID equal to its own SET_OF_BOOKS_ID and a literal -1 for the reporting organization identifier. The UNION (rather than UNION ALL) removes duplicate rows across the two branches.

Key Columns

  • CURRENCY_CODE / CURR_CODE — the functional currency of the ledger. In the first branch it is aliased as CURRENCY_CODE; in the second branch it is aliased as CURR_CODE.
  • SOB_NAME — the ledger name (from ledger_name or GL_SETS_OF_BOOKS.NAME).
  • SOB_ID — the ledger identifier (ledger_id or SET_OF_BOOKS_ID). This is the value typically populated by, or compared against, the p_sob_id report parameter.
  • P_SOB_ID — the parent (source) ledger identifier. For MRC reporting ledgers this is the primary ledger; for base ledgers it equals the ledger's own SOB_ID.
  • REPORTING_ORG_ID — the reporting organization identifier from the ledger relationship; it is -1 for rows sourced directly from GL_SETS_OF_BOOKS.

Common Use Cases and Queries

The view is commonly used to drive ledger/currency list-of-values logic and to resolve the accounting currency when a report is parameterized by ledger. A typical query retrieving all enabled ledgers and their currencies follows:

  • SELECT sob_id, sob_name, currency_code FROM apps.ap_srs_acctg_curr_v ORDER BY sob_name;

To resolve the reporting ledgers associated with a specific primary ledger supplied through p_sob_id:

  • SELECT sob_id, sob_name, currency_code FROM apps.ap_srs_acctg_curr_v WHERE p_sob_id = :p_sob_id;

Because both branches are combined with UNION, callers receive a single de-duplicated set of ledger/currency combinations suitable for LOV population and for constraining downstream Payables and Subledger Accounting extracts to the currency of the selected ledger. Filters should account for the fact that base ledgers return REPORTING_ORG_ID = -1, whereas MRC reporting ledgers return the actual reporting organization identifier.