Search Results update_quantities_for_form




Overview

INV_QUANTITY_TREE_PVT is an internal (private/PVT-classified) PL/SQL package in the Oracle E-Business Suite Inventory module. It implements and manages the in-memory "quantity tree" structure that Oracle Inventory uses to track on-hand, reservable, reserved, suggested, available-to-transact (att), and available-to-reserve (atr) quantities for a given organization and item across secondary inventory locations, locators, lots, and material statuses. The package exposes the procedural interface behind the quantity tree that is otherwise implemented in Oracle's C code base (for example, the C function CreateTree corresponds to the PL/SQL CREATE_TREE procedure). Because quantities, reservations, and availability calculations are highly performance-sensitive and invoked repeatedly during transactions, reservations, and pick release, the package caches tree state in server memory and matches that cache against the persistent records in the on-hand and reservation tables. The package is declared with AUTHID CURRENT_USER, so it executes under the calling user's privileges, which is typical of low-level private APIs invoked from other APPS code. It is referenced by 81 other packages, confirming its role as a shared internal utility rather than a user-facing API.

Key Procedures and Functions

The documented procedures and functions (29 total) cover the full lifecycle of a quantity tree:

Tables Accessed

The package reads and writes the core Inventory tables through APPS synonyms. MTL_ONHAND_QUANTITIES_DETAIL, MTL_RESERVATIONS, and MTL_RSV_QUANTITIES_TEMP supply on-hand and reservation quantities, with MTL_MATERIAL_TRANSACTIONS_TEMP and MTL_TRANSACTION_LOTS_TEMP supporting transactional and lot-level operations. MTL_SECONDARY_INVENTORIES, MTL_ITEM_LOCATIONS, MTL_LOT_NUMBERS, MTL_MATERIAL_STATUSES(_B), MTL_SYSTEM_ITEMS(_B), and MTL_PARAMETERS resolve the item, subinventory, locator, lot, status, and organizational attributes that shape tree nodes. MTL_DO_CHECK_TEMP and MTL_TXN_REQUEST_HEADERS support consistency checking and move-order processing.

Usage Notes

Because it is a PVT API, INV_QUANTITY_TREE_PVT is not intended for direct customer invocation. It is called by Inventory forms (including form-specific variants such as UPDATE_QUANTITIES_FOR_FORM), the pick-release and WMS detailing engines (where pick_release is set to non-zero), reservation processing, and the many internal packages that depend on it. Callers follow the create-query-update-free pattern, locking the tree when concurrency demands it and freeing it when finished to avoid leaking shared memory.