Search Results update_globals




Overview

APPS.HRI_BPL_OE_ORDER is a PL/SQL package body that belongs to the Oracle E-Business Suite Human Resources Intelligence (HRI) product family, specifically the Business Process Library (BPL) layer that supports Oracle Order Management (OE) data extraction and reporting. In Oracle EBS 12.1.1 and 12.2.2, this package provides a lightweight caching and lookup utility for translating an Order Management line identifier into its associated business-facing attributes, namely the order line number, the order number, and the order header identifier.

The package is classified in the ETRM repository as an "OTHER" API, meaning it is not published as a formal open interface or public API but is instead an internal helper used by other HRI components. Its design reflects a common EBS technique: caching frequently requested parent record attributes in package-level global variables so that repeated calls against the same line ID avoid redundant SQL executions against the Order Management base tables.

Key Procedures and Functions

  • GET_LINE_NUMBER — Returns the order line number corresponding to a supplied Order Management line identifier. The function first checks whether the requested line ID matches the currently cached line ID; on a cache hit it returns the cached value immediately, and on a cache miss it refreshes the cache before returning.
  • GET_ORDER_NUMBER — Returns the order number for the header associated with a supplied line identifier. It follows the same cache-hit/cache-miss pattern as GET_LINE_NUMBER.
  • GET_HEADER_ID — Returns the header identifier of the order that owns the supplied line identifier, using the same cache validation logic.

All three functions rely on an internal procedure, UPDATE_GLOBALS, which is not separately documented in ETRM but is visible in the package source. UPDATE_GLOBALS opens a cursor joining the order headers and lines tables on the supplied line ID and populates the four package globals: g_line_id, g_line_number, g_header_id, and g_order_number. The globals are typed using the %TYPE attribute against OE_ORDER_LINES_ALL.LINE_NUMBER, OE_ORDER_HEADERS_ALL.ORDER_NUMBER, OE_ORDER_LINES_ALL.LINE_ID, and OE_ORDER_HEADERS_ALL.HEADER_ID, ensuring datatype consistency with the underlying columns.

Tables Accessed

  • OE_ORDER_HEADERS_ALL — Read to retrieve the ORDER_NUMBER and HEADER_ID values for the order that owns the supplied line. The table is accessed through its APPS synonym and is treated as a read-only source.
  • OE_ORDER_LINES_ALL — Read to resolve the LINE_NUMBER and HEADER_ID that correspond to a given LINE_ID, and to join the line to its parent header.

Both tables are core Order Management base tables. HRI_BPL_OE_ORDER only reads from them; no inserts, updates, or deletes are performed.

Usage Notes

This package is an internal dependency of other HRI packages rather than a directly invocable API. ETRM records that it is referenced by one other package, which drives the lookups at runtime. Because the caching globals are session-scoped, the optimization benefits callers that process many lines belonging to the same order, or that repeatedly request attributes for the same line ID, within a single database session.

The package is typically invoked from server-side PL/SQL in the context of Oracle HRMS Intelligence reporting, extracting Order Management transactional detail for analytical output. Custom code should treat it as a private helper; developers requiring line or order attribute lookups in their own extensions should prefer the documented Order Management public APIs. In both 12.1.1 and 12.2.2 the package logic is identical, as evidenced by the $Header version string dated 2005.