Search Results get_transaction_version




Overview

APPS.OE_VERSION_HISTORY_UTIL is a utility PL/SQL package in Oracle Order Management (OM) that manages and retrieves version history for order entities. The package resides in the APPS schema and is classified as a UTIL (utility) API rather than a public business API. Its central purpose is to capture point-in-time snapshots of order header, price adjustment, sales credit, and line data into shadow history tables, and to reconstruct a prior version of an order transaction when required. This supports auditability, change tracking, and workflow-driven version management across the order lifecycle.

The package header carries a package-level constant G_PKG_NAME for error and message handling, and a private boolean G_INTERNAL_QUERY used to avoid redundant database round trips when determining the current version. The naming convention (OE_ prefix, _UTIL suffix) and the "noship" header tag indicate this is an internal utility used by Order Management and its dependent processes rather than a documented integration surface.

Key Procedures and Functions

The ETRM metadata documents five procedures and functions, with 14 total procedures and functions present in the package body:

  • CREATE_VERSION_HISTORY — Accepts an order header identifier, version number, a phase change flag, and an optional changed attribute, then writes a new version record capturing the current state of the order transaction. It returns a standard API return status so callers can detect failures.
  • GET_TRANSACTION_VERSION — Retrieves the full versioned image of an order by header and version. It populates the OE_ORDER_PUB header record, adjustment tables, sales credit tables, and the corresponding line and line-adjustment collections, returning these through NOCOPY OUT parameters for efficiency.
  • QUERY_ROW — Overloaded to query a single header row or a single header-adjustment row. The version_number and phase_change_flag parameters restrict retrieval to a specific historical version, and the caller passes the target record as an IN OUT NOCOPY argument. A comment in the source explicitly notes its use for querying from the history tables.
  • QUERY_ROWS — The collection-oriented counterpart to QUERY_ROW, querying multiple header-adjustment rows into a general table type. It accepts a price adjustment identifier and/or header identifier (defaulting to FND_API.G_MISS_NUM where not supplied), plus version constraints.
  • GET_STATUS — Returns status information for the utility's versioning operations.

Tables Accessed

The package reads and writes the Order Management transactional base tables and their history counterparts, referenced through APPS synonyms:

Usage Notes

OE_VERSION_HISTORY_UTIL is typically invoked internally by Order Management rather than called directly from client code. It is referenced by four other packages, which trigger version capture during order booking, header and line updates, phase changes, and price or sales-credit modifications. Custom code should generally use the public OE_ORDER_PUB APIs for order maintenance; the utility's QUERY_ROW and QUERY_ROWS interfaces are appropriate where a prior version of an order must be reconstructed for inquiry, comparison, or correction scenarios. The version_number and phase_change_flag parameters govern which historical image is returned, and the G_INTERNAL_QUERY guard reduces repeated version lookups during a single processing cycle. Because the package writes directly to history tables, it should be treated as an internal, version-sensitive component: direct customization carries upgrade risk across EBS 12.1.1 and 12.2.2.