Search Results backup_tree




Overview

INV_QUANTITY_TREE_GRP is a public PL/SQL package in the Oracle EBS Inventory (INV) application, owned by the APPS schema and classified as a Group (GRP) API. It provides a logical grouping of quantity-related APIs that allow callers to build, query, and manipulate an in-memory "quantity tree" representing quantity on hand, reservable quantity, reserved quantity, suggested quantity, and their derived available-to-transact and available-to-reserve values for a given item and demand source. The package header defines the interface constants documented in the source, including tree mode constants (g_reservation_mode and g_transaction_mode) and quantity type constants (g_qoh, g_qr_same_demand, g_qs_rsv, and g_qs_txn). Together with its companion packages (notably INV_QUANTITY_TREE_PVT), it underpins the reservation and transaction logic used throughout shipping, order management, and inventory transactions.

Key Procedures and Functions

  • CLEAR_QUANTITY_CACHE — Deletes all quantity trees held in memory. Typically invoked to release cached tree state, for example after a rollback or between batches of work.
  • CREATE_TREE — Constructs a quantity tree for a given demand source, either in reservation mode or transaction mode, using the tree mode constants defined in the package header.
  • QUERY_TREE — Returns quantity information from an existing tree so callers can inspect on-hand, reserved, suggested, or available quantities.
  • UPDATE_QUANTITIES — Changes quantities at a specified level of the tree; the quantity type constants specify whether quantity on hand, quantity reserved for the same demand source, or suggested quantities are being changed.
  • DO_CHECK — Performs the package's validation/consistency check on the quantity tree. Although the documented excerpt does not include its parameter list, this procedure is one of the eleven documented entry points and is used to verify the integrity of tree state before or after quantity updates.
  • FREE_TREE — Releases a previously created tree and its associated memory.
  • BACKUP_TREE — Saves a snapshot of the current tree state so it can be subsequently recovered.
  • RESTORE_TREE — Restores a tree from a snapshot previously created by BACKUP_TREE, enabling rollback of in-memory quantity changes.

Tables Accessed

The ETRM metadata does not enumerate specific tables for INV_QUANTITY_TREE_GRP; it is documented as accessing Inventory tables only via APPS synonyms, most likely the on-hand quantities, reservations, and item/lot/locator tables underlying the quantity tree. Because the package maintains state in memory (the quantity cache referenced by CLEAR_QUANTITY_CACHE and FREE_TREE), its primary data structure is the in-memory tree rather than a persistent table.

Usage Notes

INV_QUANTITY_TREE_GRP is referenced by approximately ten other packages in the EBS inventory and order fulfillment stack, including reservation and shipping logic. It is generally called from PL/SQL server-side code (forms, concurrent programs, and custom extensions) rather than directly by end users. Callers should create a tree in the appropriate mode, use QUERY_TREE and UPDATE_QUANTITIES to work with quantities, invoke BACKUP_TREE/RESTORE_TREE where transactional rollback of in-memory state is needed, and always call FREE_TREE or CLEAR_QUANTITY_CACHE to avoid memory leaks in long-running sessions. Because the package is classified as a Group API and its underlying logic is defined in INV_QUANTITY_TREE_PVT, customers extending EBS should treat it as an internal interface and verify compatibility when upgrading between 12.1.1 and 12.2.2.