Search Results get_reserved_qty




Overview

CTO_WIP_WRAPPER is an Oracle Manufacturing utility package owned by APPS and declared with AUTHID CURRENT_USER. It provides the core programmatic logic required to create and manage work orders for Assemble-to-Order (ATO) configurations within Oracle E-Business Suite. The package header identifies its primary purpose as generating the utilities needed to create work orders for ATO configurations, bridging the configuration captured on the sales order side with the discrete and flow manufacturing execution model on the shop floor.

The package operates at the intersection of Oracle Order Management and Oracle Work in Process. When a configured item is ordered, the system must translate the sales order configuration into a corresponding work order structure, and it must manage the reservation relationship between the resulting work order and the demand line that spawned it. CTO_WIP_WRAPPER encapsulates that translation and reservation logic so that it can be reused by concurrent programs, order management workflows, and custom extensions. The source header footer dates the original file to 2002 (CTOWIPWS.pls, version 115.8), confirming the package has been a stable element of the ATO fulfillment stack across the 11i and R12 releases, including 12.1.1 and 12.2.2.

Key Procedures and Functions

The ETRM metadata documents four procedures and functions in the package. Each addresses a distinct stage of ATO work order processing.

  • GET_ORDER_LINES — Retrieves the sales order line data used to drive work order creation. Its parameters include the operating unit organization, an offset in days, a load type distinguishing config, non-config, or both, a class code and status type used for job creation, an order number, a line id, and the concurrent request context (request id, program id, login id). It therefore serves as the selection and driving routine for the ATO job creation process.
  • RESERVE_WO_TO_SO — Establishes the reservation linkage between the generated work order supply and the originating sales order demand. This is the mechanism by which work order output is tied back to the specific order line it is intended to satisfy.
  • GET_RESERVED_QTY — Returns the quantity already reserved against a work order or demand reference. This is the function most frequently sought by developers investigating reservation balances, and it supplies the reserved quantity used in availability and fulfillment decisions.
  • GET_NOTINV_QTY — Returns the quantity that is not available within inventory, complementing the reserved quantity calculation when assessing how much of a configured demand can be met from existing stock versus newly created supply.

These four routines together cover the life cycle of ATO supply: identifying eligible order lines, creating the associated work orders through the interface, reserving the resulting supply, and reporting reserved and non-inventory quantities for downstream consumption.

Tables Accessed

The package references a broad set of tables through APPS synonyms, spanning order management, bills of material, inventory, and work in process.

Usage Notes

CTO_WIP_WRAPPER is invoked primarily in the context of ATO work order creation and reservation processing. The package is referenced by two other packages, indicating it functions as a shared utility layer rather than a standalone entry point. Typical invocation paths include concurrent programs that select eligible configuration order lines and insert corresponding records into WIP_JOB_SCHEDULE_INTERFACE for WIP mass load, as well as order management workflows that need to reserve newly created work order supply against the originating sales order. Developers searching for get_reserved_qty should note that the function returns reserved quantity derived from reservation and work order data and is intended to be called from custom PL/SQL rather than directly from a form; callers should supply the appropriate work order or demand identifiers and treat the returned value as the currently reserved portion of supply. Because the package uses AUTHID CURRENT_USER, execute privileges and any invoker-rights behavior depend on the calling user's grants. Custom code should call the documented routines rather than manipulate MTL_RESERVATIONS or the WIP interface tables directly, to preserve the integrity of the reservation and work order creation logic.