Search Results next_attribute




Overview

OE_AUDIT_HISTORY_PVT is a private PL/SQL package in the Oracle Order Management (OE) module of Oracle E-Business Suite. It provides the internal engine used to capture, persist, and resolve audit trail information for sales order entities. When order attributes are created or modified, the audit framework must record both the raw attribute identifier and a human-readable representation of the changed value. This package supplies the conversion routines that translate stored identifiers into display values, and it manages the insertion and maintenance of audit history rows for sets of attributes associated with orders.

The package is classified as PVT (private), meaning it is not intended as a public integration API. It is invoked by the Order Management audit infrastructure and by a small number of dependent packages. The source header indicates a build level of 120.20.12010000.2 dated 2008, consistent with the 12.1.1 code line that remains functionally stable in 12.2.2. The "next_attribute" search term relates to the package's role in advancing through the attribute collection when building audit history records.

Key Procedures and Functions

The package exposes thirteen documented procedures and functions:

  • SET_ATTRIBUTE_HISTORY — records individual attribute-level audit history entries, capturing the attribute and its before/after values.
  • RECORD_SET_HISTORY — persists a complete set of attribute changes as a single history transaction.
  • DELETE_SET_HISTORY — removes previously recorded set history rows.
  • ID_TO_VALUE — a conversion function that resolves an attribute ID and stored value into a display value; this is the core routine illustrated in the source excerpt.
  • GET_VALUESET_ID_R — retrieves the value set identifier associated with an attribute.
  • GET_ATTRIBUTE_VALUE — returns the current stored value for a given attribute.
  • VALUE_EXISTS_IN_TABLE — validates that a supplied value exists in its reference table.
  • GET_DISPLAY_NAME — returns the display name of an attribute.
  • GET_COLUMN_LABEL — resolves the column label used in the audit display.
  • INVENTORY_ITEM — converts an inventory item identifier into its display form.
  • GET_TRANSLATED_VALUE — returns a translated (language-specific) display value.
  • COMPARE_CREDIT_CARD — compares credit card values for audit comparison purposes.
  • GET_CARD_ATTRIBUTE_VALUE — returns the masked or resolved credit card attribute value.

ID_TO_VALUE branches on ATTRIBUTE_CODE, delegating to OE_ID_TO_VALUE for codes such as SALES_CREDIT_TYPE_ID, ACCOUNTING_RULE_ID, AGREEMENT_ID, CONVERSION_TYPE_CODE, and DELIVER_TO_CONTACT_ID. SALESREP_ID is resolved directly against RA_SALESREPS, and DELIVER_TO_ORG_ID against HZ_CUST_SITE_USES_ALL.

Tables Accessed

The package reads and writes several core Order Management and shared reference tables through APPS synonyms. OE_AUDIT_ATTR_HISTORY is the primary audit store for attribute-level history. OE_ORDER_HEADERS_ALL, OE_ORDER_HEADER_HISTORY, OE_SETS, and OE_SETS_HISTORY support set-level audit and header-level tracking. OE_PC_CONSTRAINTS and OE_PC_ATTRIBUTES_V supply attribute metadata and constraint definitions.

Reference and lookup access includes HZ_CUST_ACCOUNTS, HZ_CUST_SITE_USES_ALL, and HZ_PARTIES for customer and site information; MTL_SYSTEM_ITEMS_KFV for inventory items; RA_SALESREPS for sales representatives; IBY_CREDITCARD_H for credit card handling; FND_FLEX_VALIDATION_TABLES for value set validation; and FND_USER and FND_RESPONSIBILITY_TL for user and responsibility translation. DBMS_SQL is used for dynamic SQL where value resolution requires runtime-constructed queries.

Usage Notes

OE_AUDIT_HISTORY_PVT is invoked implicitly by Order Management audit processing rather than directly by end users. It is called when order header attributes are modified, when the audit framework builds a history record, and when audit information is displayed back to the user in Order Management forms. Two other packages reference it, indicating reuse within the audit subsystem. Customizations should not call this private package directly, as its interface may change between patch levels; instead, developers should use the public audit APIs or the Order Management open interfaces.