Search Results inv_quantity_tree_grp




Overview

INV_QUANTITY_TREE_GRP is a public "group" (GRP) package body in the APPS schema that supports the Oracle Inventory quantity tree feature. The quantity tree is a hierarchical, in-memory representation of an item's on-hand balances across inventory organizations, subinventories, locators, and lots/serial numbers. Applications such as the Inventory quantity tree window and the on-hand quantity drill-down use this structure to navigate and summarize quantities without repeatedly querying base tables. The GRP package acts as the public programmatic interface to the underlying private implementation maintained by INV_QUANTITY_TREE_PVT; it exposes a controlled set of entry points that create, query, update, and dispose of the in-memory quantity tree, while delegating detailed validation and data access to the private layer.

Key Procedures and Functions

The documented interface comprises eleven documented procedures and functions, of which the following are named in the ETRM metadata for 12.2.2:

  • CLEAR_QUANTITY_CACHE — Purges cached quantity tree data so that subsequent queries read current on-hand information rather than stale cached values.
  • CREATE_TREE — Builds the quantity tree for the specified criteria, establishing the hierarchical structure that later calls query and update.
  • QUERY_TREE — Retrieves quantities and related attributes from an existing tree, used by callers to populate display or processing logic.
  • UPDATE_QUANTITIES — Applies quantity changes to the tree, reflecting transactions or adjustments made against the represented inventory.
  • DO_CHECK — Performs validation checks on the tree or its quantities, enforcing business rules before further processing.
  • FREE_TREE — Releases the memory and resources associated with a tree once the caller has finished with it.
  • BACKUP_TREE — Captures a snapshot of the current tree so that it can be preserved or restored.
  • RESTORE_TREE — Reinstates a previously backed-up tree, allowing rollback to a known state.

Every routine is a public wrapper; the substantive logic resides in INV_QUANTITY_TREE_PVT. Callers should use these procedures rather than calling the private package directly, as error handling is routed through FND_MSG_PUB and FND_API conventions.

Tables Accessed

The ETRM metadata does not enumerate specific base tables; the package's dependency list references INV_QUANTITY_TREE_GRP and INV_QUANTITY_TREE_PVT along with the standard FND_API, FND_MSG_PUB, and SYS.STANDARD utilities. The quantity tree is primarily an in-memory construct, and the underlying private package is responsible for reading inventory on-hand, subinventory, locator, lot, serial, and item master information through APPS synonyms as required to populate and validate the tree. The backup and restore routines imply the existence of a temporary storage structure rather than direct writes to transactional inventory tables; persistence in the base tables occurs through the transaction-processing APIs, not through this group package.

Usage Notes

INV_QUANTITY_TREE_GRP is a GRP-class API and is referenced by ten other packages in the EBS instance, making it an internal integration point for Inventory forms (such as the on-hand quantity tree and material workbench) and for concurrent or custom programs that require hierarchical quantity navigation. The conventional usage pattern is sequential: CREATE_TREE to instantiate, QUERY_TREE and UPDATE_QUANTITIES to interrogate and adjust, DO_CHECK to validate, and FREE_TREE to release. BACKUP_TREE and RESTORE_TREE are typically employed where a caller must temporarily alter quantities and then revert. Because the package manages cached, session-scoped state, custom code should invoke FREE_TREE before exit to avoid stale data and memory retention, and should call CLEAR_QUANTITY_CACHE whenever underlying quantities may have changed. This package is compatible with both EBS 12.1.1 and 12.2.2.