Search Results validate_supply_demand




Overview

The APPS.AHL_INV_RESERVATIONS_GRP package body is a PL/SQL grouping API within the Oracle Enterprise Asset Management (eAM) / Asset Lifecycle (AHL) schema of Oracle E-Business Suite, present in both 12.1.1 and 12.2.2. It is classified under the inventory reservation domain and exists to bridge the eAM maintenance scheduling model with Oracle Inventory's reservation engine. The package supplies the Inventory APIs with the projected availability of a document — namely a work order, visit task, or scheduled material line — so that the "available to reserve" (ATR) quantity can be computed correctly. Because the ordered or receipted quantity recorded on a document does not always represent the expected quantity still pending, this package resolves the true, final expected supply or demand position before a reservation is created or modified. The package is referenced by two other packages, making it a supporting dependency rather than a top-level entry point, and it draws on the FND_LOG framework (levels statement, procedure, error, and unexpected) for diagnostic traceability, as reflected in its header constants.

Key Procedures and Functions

ETRM documents two procedures within this package:

  • GET_AVAILABLE_SUPPLY_DEMAND — Returns the final availability of a document line for which a reservation is being created or modified. Its stated purpose is to be called by the inventory APIs to obtain the expected availability at the document level, supplying the available quantity and source unit-of-measure information needed so the reservation API can calculate ATR. Inputs encompass the item context (organization, item, revision, lot, subinventory, locator, LPN, project, and task) together with supply/demand identification codes, types, headers, lines, and line detail. Outputs include the available quantity and both the source UOM code and source primary UOM code. Standard API signaling parameters (API version, init message list, return status, message count, message data) frame the call.
  • VALIDATE_SUPPLY_DEMAND — The procedure associated with the search term validate_supply_demand. It performs validation of the supply or demand document referenced by the reservation request, confirming that the identified entity is eligible and consistent before availability is returned or a reservation is accepted. It functions as the integrity gate preceding reservation processing; the documented metadata does not enumerate its individual parameters, and the specific validation rules are not disclosed in the reference material.

Tables Accessed

The package operates against the following tables through APPS synonyms:

  • AHL_WORKORDERS, AHL_VISIT_TASKS_B, AHL_SCHEDULE_MATERIALS — the eAM maintenance documents that constitute the supply/demand source. Header, task, and material line records are read to establish the document context and derived availability.
  • WIP_DISCRETE_JOBS — consulted where the supply originates from a discrete manufacturing job, permitting work-in-process supply to be recognized in the availability calculation.
  • MTL_RESERVATIONS — the Inventory reservation table, examined to determine existing reservations and therefore the quantity already consumed against the document, which directly affects the ATR result.

Usage Notes

This package is not normally invoked directly by end users. It is called programmatically by Oracle Inventory reservation APIs and by the two dependent packages that reference it, typically during reservation creation or modification originating from eAM work order material planning, maintenance scheduling screens, or associated concurrent processing. Because the procedures are conventional EBS APIs, custom code must respect the standard parameter convention: passing an API version, honoring the init message list, and inspecting x_return_status, x_msg_count, and x_msg_data before proceeding. The presence of FND_LOG constants indicates that runtime tracing can be enabled through the standard logging profile options to diagnose availability discrepancies. Implementers integrating custom reservation logic should treat validate_supply_demand as the mandatory pre-check and get_available_supply_demand as the authoritative source of the projected quantity, rather than deriving availability from document ordered quantities alone.