Search Results get_onhand_avail_quant
Overview
APPS.EAM_MATERIAL_ALLOCQTY_PKG is a PL/SQL package in Oracle E-Business Suite that supports the Enterprise Asset Management (EAM) work order and material allocation process. Its central responsibility is to reconcile the material requirements of a work order operation against the quantities that have already been allocated and issued, thereby exposing the allocated, open, on-hand, and available quantities for a given inventory item. These four quantities drive the decisions made on the EAM work order material transaction screens, including how much material remains to be reserved, issued, or transferred to satisfy an operation's demand.
The package is declared with AUTHID CURRENT_USER, meaning that name resolution and privilege checking execute under the calling schema's authority rather than the APPS schema owner. The source header (EAMMRALS.pls 120.1) indicates a stable, long-lived object in the EAM module; the presence of a 12.1 source sub-project comment on the GET_ONHAND_AVAIL_QUANT parameter confirms that the API was adapted during the 12.1 development cycle but remains valid in the 12.2.2 code line.
Key Procedures and Functions
- ALLOCATED_QUANTITY — A function that returns the quantity already allocated to a specific work order operation for a given organization and inventory item by querying the inventory transaction tables. It accepts the work order entity, operation sequence number, organization, and item as inputs and returns a NUMBER.
- OPEN_QUANTITY — A function that returns the outstanding quantity for an operation, calculated from the required quantity and the quantity issued. If the computed value falls below zero, the function normalizes the result to zero so that callers never receive a negative open quantity.
- QUANTITY_ALLOCATED — A procedure that wraps the ALLOCATED_QUANTITY function and returns the allocated quantity through an OUT NOCOPY parameter, providing a procedure-style interface for callers that prefer output parameters over function return values.
- GET_ONHAND_AVAIL_QUANT — A procedure that delegates to EAM_COMMON_UTILITIES_PVT.GET_ONHAND_QUANT to obtain both the on-hand quantity and the available quantity for an inventory item, returning them through two OUT NOCOPY parameters. It accepts the organization, inventory item, and an optional subinventory code (annotated as the 12.1 source sub-project), allowing the caller to scope the availability check to a specific subinventory when required.
Tables Accessed
The documented table references for this package are MTL_TXN_REQUEST_HEADERS and MTL_TXN_REQUEST_LINES, the base tables behind Oracle Inventory's movement request (subinventory transfer and move order) functionality. The package reads these tables to derive allocation and issue status for EAM work order material, since material allocated to an EAM operation is frequently staged and transacted through move orders. Indirectly, the availability logic reached through EAM_COMMON_UTILITIES_PVT draws on the inventory on-hand and reservations data, which is the standard basis for available-to-promise style calculations in Oracle Inventory. No direct DML against these tables is documented; the package operates as a read-only query provider.
Usage Notes
EAM_MATERIAL_ALLOCQTY_PKG is an internal utility package rather than a public, supported open interface. It is invoked by EAM forms and concurrent programs when rendering work order material requirements, and it is referenced by eight other packages in the ETRM repository, indicating that it functions as a shared calculation layer for EAM material logic. The on-hand and availability procedure is frequently located by developers searching for "get_onhand_avail_quant," reflecting its common use as a compact way to obtain both quantities in a single call without reimplementing inventory queries.
Because the package is classified as OTHER and carries an Oracle proprietary notice, customizations should call it only through supported EAM flows where possible. Direct invocation from custom code is feasible — particularly GET_ONHAND_AVAIL_QUANT, whose parameters are explicit and whose OUT parameters make it convenient within PL/SQL — but the AUTHID CURRENT_USER declaration means the calling schema must hold the necessary privileges on the underlying inventory objects. The optional subinventory parameter should be supplied when availability must be evaluated within a specific staging location, and omitted when a whole-organization view is intended.
-
PACKAGE: APPS.EAM_MATERIAL_ALLOCQTY_PKG
12.2.2
-
PACKAGE: APPS.EAM_MATERIAL_ALLOCQTY_PKG
12.1.1
-
PACKAGE BODY: APPS.EAM_MATERIAL_ALLOCQTY_PKG
12.1.1
-
PACKAGE BODY: APPS.EAM_MATERIAL_ALLOCQTY_PKG
12.2.2
-
APPS.EAM_MATERIAL_ALLOCQTY_PKG dependencies on EAM_MATERIAL_ALLOCQTY_PKG
12.1.1
-
APPS.EAM_MATERIAL_ALLOCQTY_PKG dependencies on EAM_MATERIAL_ALLOCQTY_PKG
12.2.2