Search Results get_yes_no




Overview

APPS.EAM_MATERIAL_VALIDATE_PUB is a public PL/SQL package in Oracle E-Business Suite Enterprise Asset Management (EAM). Its body is delivered in the source file EAMPMTSB.pls (version 120.7, dated 06-APR-2006, originally authored 02-FEB-2005). The package encapsulates material validation logic used by EAM work orders: it determines open material quantities and detects whether a work order is facing a material shortage. This validation is central to work order execution, because a work order cannot be released or progressed reliably if its required components have not been allocated or issued. By externalizing this logic into a PUB-classified package, Oracle allows both standard EAM work order flows and customer extensions to reuse the same calculations and shortage checks consistently. The package is referenced by two other packages, confirming it functions as a shared utility layer rather than a standalone entry point. The header comment notes the 2005 creation by Girish Rajan; a later revision was applied by gbadoni in 2006.

Key Procedures and Functions

  • GET_OPEN_QTY — A function returning a number. It computes the open quantity from three input quantities: required quantity, allocated quantity, and issued quantity. The body subtracts allocated and issued quantities from the required quantity, and returns 0 when the result is negative. This guards callers against negative open quantities when over-allocation or over-issue has occurred.
  • CHECK_SHORTAGE — A procedure that takes a work order identifier (Wip Entity Id) and returns an OUT NOCOPY shortage flag. A value of 'Y' indicates a material shortage exists; 'N' indicates no shortage. As described in the source comments, it acts as a wrapper API: for a given work order it determines whether material shortage exists and updates the shortage field at the work order level. This makes the procedure both a query and a persistence operation.
  • ESCAPEXMLEAM — A documented procedure whose purpose is to escape XML-special characters in EAM data (apostrophes, angle brackets, ampersands) so values can be safely embedded in XML payloads.

The user query "get_yes_no" does not correspond to a procedure in this package; the shortage result is expressed as a 'Y'/'N' character flag rather than through a get_yes_no style helper.

Tables Accessed

The package reads and writes the following tables through APPS synonyms:

  • WIP_ENTITIES — The work order header, used to identify the work order and to store the shortage flag updated during validation.
  • WIP_DISCRETE_JOBS — Discrete job information associated with the work order.
  • WIP_REQUIREMENT_OPERATIONS — Component requirements for the work order, the basis for required, allocated, and issued quantities.
  • EAM_WORK_ORDER_DETAILS — EAM-specific work order detail attributes.
  • CSI_ITEM_INSTANCES — Instances of the asset items referenced by the work order, used in EAM material validation.

Usage Notes

EAM_MATERIAL_VALIDATE_PUB is typically invoked from EAM work order forms and from other PL/SQL packages in the EAM work management flow, particularly before release or during shortage review. Because it is classified PUB, the APIs are supported for direct call from custom code; callers should invoke CHECK_SHORTAGE with a valid Wip Entity Id and inspect the returned 'Y'/'N' flag, using GET_OPEN_QTY when only the arithmetic open quantity is needed. Business events or concurrent processes that refresh shortage status can call the same wrapper, since it updates the work order record itself. As with all APPS public APIs, customizations should avoid modifying the package body and instead call the documented procedures.