Search Results ar_gl_segments_ref_v




Overview

AR_GL_SEGMENTS_REF_V is a reference view owned by the APPS schema within the Oracle E-Business Suite Receivables (AR) module. Its documented purpose is to return the Balancing segment and Natural Account segment values associated with a given General Ledger code combination. Unlike transactional tables that store raw data, this view is a derived, read-only construct that resolves flexible structure segment values on the fly by invoking a public package function. In Oracle EBS 12.1.1 and 12.2.2, this object is used principally in reporting, integration, and extraction contexts where the Receivables application needs to surface descriptive accounting segment values rather than simply the numeric CODE_COMBINATION_ID.

The view is particularly relevant to the Subledger Accounting (SLA) and XLA extraction infrastructure. Because the AR product relies on the Accounting Flexfield (AFF) to determine how transactions post to the General Ledger, a mechanism is required to translate a chart of accounts and code combination into human-readable balancing and natural account segments. This view centralizes that translation, shielding the consumer from the mechanics of the segment value resolution routine.

Underlying Base Objects

Per the documented metadata, the view is defined over the following base objects:

  • GL_CODE_COMBINATIONS (SYNONYM) — The GL code combination table, referenced in the view text as the alias GCC. This is the driving table that supplies the CHART_OF_ACCOUNTS_ID and CODE_COMBINATION_ID, which in turn are the parameters passed to the segment resolution function.
  • ARP_XLA_EXTRACT_MAIN_PKG (PACKAGE) — The Subledger Accounting extraction main package, whose public function THE_SEGMENT_VALUE performs the actual lookup of a segment value given the chart of accounts, the segment type (for example GL_BALANCING or GL_ACCOUNT), and the code combination identifier.

The relationship is straightforward: for each row in GL_CODE_COMBINATIONS, the view calls ARP_XLA_EXTRACT_MAIN_PKG.THE_SEGMENT_VALUE twice — once for the balancing segment and once for the natural account segment — and projects the results as columns.

Key Columns

  • AR_GL_CODE_COMBINATION_ID — The source CODE_COMBINATION_ID from GL_CODE_COMBINATIONS, uniquely identifying the accounting flexfield combination.
  • AR_GL_BALACING_SEGMENT_VALUE — The resolved Balancing segment value, obtained via THE_SEGMENT_VALUE with a segment type of GL_BALANCING. Note that the column name preserves the historical misspelling "BALACING" as it appears in the ETRM documentation.
  • AR_GL_NATURAL_SEGMENT_VALUE — The resolved Natural Account segment value, obtained with a segment type of GL_ACCOUNT.

Common Use Cases and Queries

Typical scenarios include joining transaction-level data to resolve which balancing and natural account segments were used, validating that receivables activity maps to the correct accounts, and supporting SLA extraction and reconciliation reporting. A representative query is:

  • Resolve segments for a specific combination: SELECT ar_gl_code_combination_id, ar_gl_balacing_segment_value, ar_gl_natural_segment_value FROM ar_gl_segments_ref_v WHERE ar_gl_code_combination_id = :code_combination_id;
  • Join to a transaction table (conceptual): SELECT t.trx_number, v.ar_gl_balacing_segment_value, v.ar_gl_natural_segment_value FROM ra_customer_trx_all t JOIN ar_gl_segments_ref_v v ON t.code_combination_id = v.ar_gl_code_combination_id;
  • Extract all combinations with their segments: SELECT * FROM ar_gl_segments_ref_v;

Because each row invokes a PL/SQL function, performance-sensitive queries should filter on AR_GL_CODE_COMBINATION_ID where possible and avoid unrestricted full scans against large code combination sets.