Search Results inadequate_qty




Overview

APPS.WMS_TXNRSN_ACTIONS_PUB is a public PL/SQL package in Oracle Warehouse Management (WMS), part of the Oracle E-Business Suite supply chain execution stack. The package encapsulates the business logic that Oracle WMS executes when a warehouse operator responds to an exception during a directed picking, put-away, or cycle counting task. The reason-code framework in WMS allows the user to declare why a task could not be completed as directed — insufficient quantity, wrong location, damaged goods, and similar conditions. WMS_TXNRSN_ACTIONS_PUB translates that user decision into the corresponding transactional consequences: adjusting or re-detailing the material transaction temporary (MMTT) line, reserving alternate inventory, generating replacement tasks in the dispatched task queue, and recording the exception itself. The package is classified as a public (PUB) API, meaning it is supported for invocation by other Oracle modules and by customer extensions, and it is referenced by seven other packages within the EBS codebase, confirming its role as a shared service rather than a private implementation detail. The header comments identify the source file as WMSTRSAS.pls and the last recorded revision as version 120.1.12000000.2, dated October 2007, which is consistent with the code line shipped through EBS 12.1.1 and 12.2.2.

Key Procedures and Functions

The package exposes seven documented procedures and functions:

  • INADEQUATE_QTY — Invoked when a user selects Inadequate Qty as the reason code. It calls the Suggest_new_location logic to update the existing MMTT line with the revised quantity and to re-detail the move order line for the remaining quantity, then inserts any newly created tasks into WMS_DISPATCHED_TASKS for the supplied user, and finally calls Log_exception to record the discrepancy in WMS_EXCEPTIONS.
  • SUGGEST_ALTERNATE_LOCATION — Provides the user with a suitable alternative locator when the directed location cannot fulfill the task, supporting the redirection of picking or put-away activity without abandoning the task.
  • LOG_EXCEPTION — The central error-recording routine. It inserts a row into WMS_EXCEPTIONS (through the WMS_EXCEPTIONS_S sequence), capturing the exception context and the reason code supplied from MTL_TRANSACTION_REASONS. This is the procedure most commonly referenced directly by custom integrations.
  • CLEANUP_TASK — Removes or resets task and temporary transaction artifacts once an exception path has been resolved or abandoned, preventing orphaned rows in the dispatched task and MMTT tables.
  • PROCESS_EXCEPTIONS — The driving entry point that evaluates an exception condition and dispatches control to the appropriate action routine such as INADEQUATE_QTY or SUGGEST_ALTERNATE_LOCATION.

The INADEQUATE_QTY signature documents standard EBS API conventions: p_api_version, p_init_msg_list, p_commit, the organization, MMTT, item, subinventory and locator identifiers, p_qty_picked defaulting to zero, an optional p_carton_id LPN, p_user_id, and p_reason_id. Return status is reported through x_return_status.

Tables Accessed

The package reads and writes standard inventory and WMS tables through APPS synonyms. MTL_MATERIAL_TRANSACTIONS_TEMP and its related lot, serial, and transaction temporaries hold the in-flight transaction being adjusted. MTL_ONHAND_QUANTITIES_DETAIL and MTL_RESERVATIONS are consulted to validate availability at the suggested location. MTL_SYSTEM_ITEMS, MTL_LOT_NUMBERS, and MTL_SERIAL_NUMBERS provide item and control-level attributes. MTL_TRANSACTION_REASONS supplies the reason code definition. MTL_TXN_REQUEST_HEADERS and MTL_TXN_REQUEST_LINES represent the move order being re-detailed. WMS_DISPATCHED_TASKS and WMS_EXCEPTIONS, with its WMS_EXCEPTIONS_S sequence, are the WMS-side destinations for new tasks and recorded exceptions.

Usage Notes

In a standard EBS 12.1.1 or 12.2.2 deployment this package is invoked by the WMS mobile radio-frequency user interface when an operator rejects or partially completes a directed task and selects a reason code; the calling forms and mobile servlets pass the MMTT identifier and reason identifier into Process_exceptions. It is also callable from concurrent programs that reconcile outstanding exceptions, and from custom PL/SQL that needs to record a WMS exception programmatically. Because it is a PUB API, the supported pattern for custom code is to call Log_exception rather than inserting into WMS_EXCEPTIONS directly, ensuring sequence and validation logic are honored. Callers should respect the FND_API conventions: set p_init_msg_list to FND_API.G_TRUE when they intend to read the returned message stack, and pass p_commit according to their own transaction boundaries, remembering that the package participates in the caller's unit of work.