Search Results check_rts_workorder_exists
Overview
APPS.AHL_PRD_MTLTXN_PVT is a private (PVT) PL/SQL package belonging to the Oracle Enterprise Asset Management and Complex Maintenance, Repair and Overhaul (CMRO) product family within Oracle E-Business Suite. Its responsibility is to manage material transaction activity associated with AHL work orders — the material movement records generated when parts, components, and serviceable inventory are issued, returned, transferred, or consumed against a work order or visit task. The package encapsulates the business validation and data persistence logic behind material issuance and return processing, exposing a record type (Ahl_Mtltxn_Rec_Type) that is used to shuttle material transaction attributes between the user interface layer, the validation layer, and the underlying repository tables.
The package also declares profile-driven material status constants (AHL_MTL_MAT_STATUS_SERVICABLE, AHL_MTL_MAT_STATUS_UNSERVICEABLE, and AHL_MTL_MAT_STATUS_MRB) that classify inventory condition during transaction processing. Because the object is classified as a PVT (private) package, it is intended for internal consumption by Oracle's own AHL forms, concurrent programs, and other AHL modules rather than as a supported public API.
Key Procedures and Functions
- PERFORM_MTL_TXN — Drives the execution of a material transaction for a work order, applying validation results and persisting the transaction record.
- VALIDATE_TXN_REC — Validates the contents of a material transaction record against the applicable business rules before it is processed.
- INSERT_MTL_TXN_TEMP — Inserts a material transaction into the temporary/staging table used during the transaction lifecycle.
- GET_MTL_TRANS_RETURNS — Retrieves material transaction return information for a work order, supporting the return-to-stock (RTS) flow.
- GET_ISSUED_QTY — Returns the issued quantity associated with a work order, item, or defined transaction context. This is the function surfaced by the user's search term and is the standard mechanism for determining how much material has already been issued.
- GET_ONHAND — Returns on-hand quantity information, used to evaluate availability before an issue.
- GET_WORKORD_LEVEL_QTY — Returns the work-order-level material quantity for a given work order context.
- GET_WORKORD_NET_QTY — Returns the net quantity for a work order, factoring issued quantity and related adjustments.
- GET_MTL_LOCATORSEGS — Returns the concatenated locator segments for a material locator, enabling display of the storage location on transaction screens.
- CHECK_RTS_WORKORDER_EXISTS — Determines whether a work order is eligible for return-to-stock transactions.
Tables Accessed
The package reads and writes the following documented objects through APPS synonyms:
- AHL_WORKORDER_MTL_TXNS and AHL_WORKORDER_MTL_TXNS_S — the primary material transaction table and its sequence; the principal target of insert and query operations.
- AHL_WORKORDERS and AHL_WORKORDER_OPERATIONS — supply work order and operation context, including work order status and operation sequence.
- AHL_SCHEDULE_MATERIALS — provides the scheduled material requirements against which issued quantities are compared.
- MTL_LOT_NUMBERS — supplies lot number references for lot-controlled transactions.
- CSI_ITEM_INSTANCES, CSI_II_RELATIONSHIPS, and CSI_TRANSACTIONS — support item instance and serialized item movement within the install base.
- AHL_UNIT_CONFIG_HEADERS — provides unit configuration context for maintenance work orders.
- AHL_VISITS_B and AHL_VISIT_TASKS_B — provide visit and visit task context associated with the transaction.
- AHL_PRD_DISPOSITIONS_B — supplies disposition codes for MRB (Material Review Board) processing.
- BOM_DEPARTMENTS — supplies department information for work order operations.
- CS_INCIDENTS_ALL — links service incidents and problem codes to the transaction.
Usage Notes
As a PVT package, AHL_PRD_MTLTXN_PVT is invoked indirectly. It is called from the AHL material transaction forms and concurrent processes that handle work order material issuance, return, and consumption, and it is referenced by six other PL/SQL packages documented in the ETRM repository. Customizations that need to read issued quantities should generally use the GET_ISSUED_QTY, GET_ONHAND, or GET_WORKORD_NET_QTY functions rather than querying AHL_WORKORDER_MTL_TXNS directly, since these functions encapsulate the business rules, profile-driven condition logic, and lot/serial handling applied during standard processing. Because the package signature is not a formally published API, Oracle does not guarantee backward compatibility across patch levels, and any dependency should be validated after upgrades or CPU patching.