Search Results qty_stolen
Overview
MSC_WF_ALLOC_ATP is an Oracle Advanced Supply Chain Planning (ASCP) package that implements the Oracle Workflow callback logic used by the ATP (Available-to-Promise) and allocation diagnostic workflows. It resides in the APPS schema and is declared with AUTHID CURRENT_USER, meaning that its unqualified references to database objects are resolved against the privileges of the invoking session rather than the package owner. The header comment ($Header: MSCWFATS.pls 120.1 2005/08/25) indicates that the package has been stable since the 11i era and is carried forward unchanged into EBS 12.1.1 and 12.2.2.
The package serves two related purposes. First, it launches and drives the workflow processes that record how ATP and allocation decisions were reached for a given planning instance, item, organization, and demand. Second, it supplies the PL/SQL activity functions that the workflow engine calls back at defined nodes to evaluate conditions and compute results. Users who search on "within_allocation" are typically looking at the workflow function that determines whether a demand line can be satisfied entirely within currently allocated supply, as opposed to drawing on additional ATP or stealing quantity from other demands.
Key Procedures and Functions
- DEBUG_WF — Captures diagnostic information for a workflow run, including the session identifier, login user, session and trace location descriptions, and the server process identifier. It is used to troubleshoot stalled or unexpectedly terminated ATP workflow instances.
- START_MSCALLOC_WF — Initiates the allocation workflow. It receives the item key, inventory item identifiers, plan and organization identifiers, instance identifier, demand class, requested quantity and date, request-date quantity, available quantity and date, stolen quantity, customer and customer site identifiers, and order number. The parameters form the context that the workflow activities subsequently evaluate.
- WITHIN_ALLOCATION — The workflow activity function that returns a result indicating whether the demand under evaluation is satisfied within the allocation already granted. It follows the standard Oracle Workflow function signature (item type, item key, activity identifier, function mode, and result out parameter) and is the object most commonly referenced in searches for the allocation logic.
- QTY_STOLEN — A companion workflow function that evaluates the quantity stolen from other demands in order to satisfy the current demand, returning its finding through the standard result out parameter.
- ATP_SATISFY — A workflow function that determines whether the demand is satisfied by available ATP, again returning its outcome through the workflow result parameter.
- START_MSCATP_WF — Initiates the ATP workflow. Its parameter list mirrors START_MSCALLOC_WF but adds a line number, allowing the ATP decision to be tracked down to the demand line level.
Tables Accessed
The package reads and writes planning and ATP temporary structures through APPS synonyms. MRP_ATP_DETAILS_TEMP and MRP_ATP_SCHEDULE_TEMP_S hold the ATP detail and schedule results being diagnosed, while MSC_SYSTEM_ITEMS, MSC_PLANS, and MSC_PLANNERS provide item, plan, and planner context. Trading partner information is resolved from MSC_TRADING_PARTNERS, MSC_TRADING_PARTNER_SITES, MSC_TP_ID_LID, and MSC_TP_SITE_ID_LID. The V$PARAMETER, V$SESSION, and V$PROCESS dynamic performance views are used exclusively by the debugging routine to record session and trace information.
Usage Notes
MSC_WF_ALLOC_ATP is not intended for direct invocation by end users. It is called by the Oracle Workflow engine when an ATP or allocation diagnostic workflow executes, and it is referenced by two other packages within the ASCP codebase. Because the workflow activity functions use the standard itemtype/itemkey/actid/funcmode/resultout interface, the procedures are registered as workflow activity definitions with the appropriate item type; changing them requires coordinated updates to those definitions. Customizations should be confined to wrapper code, since the package is a seeded, nonshipped ("noship") component whose header dates to 2005 and whose behavior is relied upon by the planning diagnostic workflows. Technical users investigating "within_allocation" behavior should trace the workflow instance for the affected demand line and use DEBUG_WF output to review the session and process context.