Search Results get_shipped_qty




Overview

The APPS.INV_MINMAX_HELPER_PVT package body is a private (PVT-classified) PL/SQL utility within the Oracle E-Business Suite Inventory module. Its name and single documented function indicate that it supports min-max planning and replenishment logic, specifically the derivation of shipped quantities against an order line. In the Oracle EBS 12.1.1 and 12.2.2 code lines, the min-max planning engine (INV_MINMAX and associated planning reports and concurrent programs) must determine net demand by subtracting quantities already shipped from open order line quantities. This helper centralizes that calculation so that the planning logic can consistently net out shipments when computing replenishment requirements.

The package is classified as a private API, meaning it is not intended as a public integration point. It is not referenced by any other documented package, which indicates it is invoked internally — most likely by the min-max planning programs themselves rather than exposed to external callers. The header comment ($Header: INVMMXDB.pls 115.1 2001/02/12) shows the source has been stable since release 11.5.x, and it has carried forward unchanged into the 12.x code lines.

Key Procedures and Functions

The package body documents a single function:

  • GET_SHIPPED_QTY — Returns the net shipped quantity for a given organization, inventory item, and order line. Internally it aggregates primary_quantity from material transactions where the transaction action is a shipment (transaction_action_id = 1) and the source line matches the supplied order line, organization, and item. The routine then negates the summed quantity and returns a positive shipped figure. Any query error is trapped and 0 is returned; a NULL aggregation result is likewise normalized to 0. Parameter lists are not enumerated here, but the function accepts organization, inventory item, and order line identifiers and returns a NUMBER.

Tables Accessed

  • MTL_MATERIAL_TRANSACTIONS — The core Inventory transaction table. The package reads shipment rows (action id 1) filtered by source_line_id, organization_id, and inventory_item_id, summing primary_quantity. This provides the authoritative shipped quantity used by min-max calculation to offset demand.

Access is through the APPS synonym, so the read is subject to the standard APPS schema grants and any Multi-Org (MOAC) security enforced on the operating unit context at call time.

Usage Notes

Because this is a private helper, it is normally called selectively from within the min-max planning engine when open order lines are evaluated for replenishment. It may surface in custom code where developers require the same "shipped quantity per order line" figure used by the standard planner, but such reuse is unsupported and carries upgrade risk. Callers should run it under a valid Inventory/APPS session so that organization context and MOAC initialization resolve correctly. Error handling swallows exceptions by returning zero, so any diagnosing of unexpected results should compare directly against MTL_MATERIAL_TRANSACTIONS for the given line. In 12.1.1 and 12.2.2 the logic is effectively identical, and no dependency on other documented packages exists, making the routine largely self-contained.