Search Results g_header




Overview

INV_TROHDR_UTIL is a utility package in the Oracle Inventory application that supports the Move Order transaction API architecture. Move orders allow organizations to create, manage, and execute requests to move material between subinventories, or from a subinventory to a destination account or location. The package operates against the MTL_TXN_REQUEST_HEADERS table, the base table that stores move order header records, and provides the low-level record manipulation routines consumed by the public Move Order API (INV_MOVE_ORDER_PUB) and its related packages.

The package is classified as a UTIL (utility) package, meaning it is not intended as a standalone business API but rather as an internal helper layer. It encapsulates the mechanical work of inserting, updating, deleting, querying, and locking move order header rows, and it manages the mapping between the descriptive attribute names used in PL/SQL record types and the surrogate attribute identifiers used by the API framework.

The source header constant g_header CONSTANT NUMBER := 22; defines the attribute identifier assigned to the move order header column within the attribute-indexed record structures used throughout the Move Order API. This constant, together with the companion constants such as g_header_status, g_organization, and g_date_required, allows the utility routines to locate specific columns of the header record by number rather than by name.

Key Procedures and Functions

The package exposes thirteen documented routines. Their responsibilities are as follows:

  • CLEAR_DEPENDENT_ATTR — Clears attribute values within a move order header record that are dependent on, and therefore invalidated by, the change of a controlling attribute.
  • APPLY_ATTRIBUTE_CHANGES — Applies pending attribute-level modifications to the header record prior to persistence.
  • COMPLETE_RECORD — Populates default and system-maintained columns so that a header record is complete and valid for DML.
  • CONVERT_MISS_TO_NULL — Translates the framework sentinel value FND_API.G_MISS_* into SQL NULL, preventing placeholder values from being written to the table.
  • UPDATE_ROW — Performs the physical update of a move order header row in MTL_TXN_REQUEST_HEADERS.
  • UPDATE_ROW_STATUS — Updates the header status and associated status date columns.
  • INSERT_ROW — Inserts a new move order header row.
  • DELETE_ROW — Removes a move order header row.
  • QUERY_ROW — Retrieves a header row and returns it into the API record structure.
  • LOCK_ROW — Acquires a row-level lock on the header, serializing concurrent modification.
  • GET_VALUES — Returns the attribute values of a header record.
  • GET_IDS — Returns the identifier values associated with a header record.

Tables Accessed

The package reads and writes MTL_TXN_REQUEST_HEADERS, accessed through the APPS synonym. This is the sole documented table reference. It stores move order header information including header number, organization, status, date required, source and destination subinventories and accounts, and descriptive flexfield attribute columns. INSERT_ROW, UPDATE_ROW, DELETE_ROW, and UPDATE_ROW_STATUS write to this table; QUERY_ROW and LOCK_ROW read from and lock rows within it.

Usage Notes

INV_TROHDR_UTIL is referenced by six other packages and is normally invoked indirectly through the Move Order public API rather than called directly by custom code. Typical call paths include the Move Order form, concurrent programs that create or update move orders, and custom integrations built on INV_MOVE_ORDER_PUB. The g_header constant is significant when custom code manipulates attribute-indexed record structures, since it identifies the header attribute by number. Direct calls should observe the same validation and locking sequence that the API layer enforces to avoid data inconsistency.