Search Results get_oh_qty




Overview

MRP_GET_ONHAND is an Oracle EBS APPS schema PL/SQL package that supports the Material Requirements Planning (MRP) and Master Scheduling (MPS) processing engine. Its documented classification is OTHER, indicating it is not a public API in the Oracle EBS sense but rather an internal helper package invoked by the planning and replenishment framework. The package's central purpose is to retrieve on-hand quantity information and to drive restocking logic used during planning and supply-chain related reports. In the ETRM metadata for release 12.2.2 the package is recorded with status VALID and two documented subprograms.

Practically, MRP_GET_ONHAND sits alongside other MRP utility packages (for example MRP_GET_ITEM_INFO and MRP_GET_CALENDAR) that supply calculated values to the planner and the Planner Workbench. Its name derives from its primary activity: returning the currently available on-hand balance for an item and organization. Requests are commonly issued in a specific inventory organization context, and profile option settings retrieved via FND_PROFILE influence behavior.

Key Procedures and Functions

The ETRM documentation records two subprograms in this package:

  • GET_OH_QTY — Returns the on-hand quantity for an item/organization combination. It is the principal entry point used by callers that need a point-in-time snapshot of available inventory when building planning or reporting output. Callers supply the item and organization identifiers; the function consolidates on-hand balances across the relevant inventory locations and returns a single numeric quantity.
  • DO_RESTOCK — Implements the restocking decision logic associated with MRP supply generation. It evaluates whether a shortage exists and determines the replenishment action required, typically contributing to scheduling or suggestions for restock. It is a procedural wrapper around the on-hand snapshot obtained from GET_OH_QTY combined with MRP plan parameters.

No parameter lists are documented in the ETRM metadata; therefore signatures should be verified in the database if custom invocations are required.

Tables Accessed

ETRM lists no explicit application tables accessed via APPS synonyms. The package body relies on standard MRP and inventory data (such as on-hand quantity views/tables) and on the FND_PROFILE API to read profile option values that affect planning behavior. Because the metadata does not enumerate base tables directly, the authoritative list should be taken from the package body, accessed through the standard "show dependent code" path referenced in the ETRM documentation.

Usage Notes

MRP_GET_ONHAND is an internal component. It is referenced by the package body of MRP_GET_ONHAND itself and by MRP_MRPRPROP_XMLP_PKG, the concurrent program package behind the MRP planning report (MRPRPROP). It is not intended as a public API and Oracle does not guarantee its signature across releases. Custom code should avoid direct calls; instead, standard on-hand enquiry APIs or supported planning interfaces ought to be used. Within the standard product, the package is invoked during MRP/MPS plan runs and when the relevant concurrent report is executed, under the responsibility of the planning manager or equivalent seeded role.