Search Results get_allocation_parms




Overview

GMI_ALLOCATION_RULES_PVT is a private PL/SQL package in the Oracle E-Business Suite (EBS) Process Manufacturing (OPM/GMI) module, deployed under the APPS schema in both release 12.1.1 and 12.2.2. Its business purpose is to retrieve and manage allocation rule parameters that govern how material, lots, or quantities are allocated within process manufacturing operations. Allocation rules in OPM determine how costs, quantities, or inventory are distributed across items, customers, and warehouses based on defined parameters such as company code, customer number, and allocation class. This package acts as a private API layer, meaning it is not intended for direct external invocation but serves as the internal engine called by other public packages, forms, and concurrent programs. It abstracts the retrieval logic for allocation parameters stored in the OP_ALOT_PRM table, ensuring a consistent and controlled interface for allocation rule lookups across the application. The package also includes error handling via the standard EBS message stack (x_return_status, x_msg_count, x_msg_data), conforming to the Oracle Application Object Library (AOL) API conventions for return status propagation.

Key Procedures and Functions

The package exposes two documented procedures:

  • GET_ALLOCATION_PARMS — This is the primary procedure. Its documented usage is to retrieve the allocation rules from the OP_ALOT_PRM table. It accepts input parameters identifying the allocation context (company code, customer number, allocation class, customer ID, ship-to organization ID, and organization ID) and returns a record containing the matching OP_ALOT_PRM row, along with standard return status and message stack outputs. The header comment notes a historical fix (BUG#2643440) that removed initialization of G_MISS_XXX defaults for several parameters, and another fix (BUG#1655007) ensuring delete_marked rows are handled correctly. The procedure uses a cursor (op_cust_mst_c1) to resolve the customer ID from OP_CUST_MST when needed.
  • GET_DEFAULT_PARMS — This companion procedure retrieves default allocation parameters. While the provided metadata does not include its full body, its naming and placement alongside GET_ALLOCATION_PARMS indicate it serves to supply fallback or default values when specific allocation rules are not found, supporting the allocation rule resolution sequence used by calling programs.

Tables Accessed

  • OP_ALOT_PRM — The central allocation parameters table. GET_ALLOCATION_PARMS reads matching rows from this table using the %ROWTYPE record output, and the table is also referenced by GET_DEFAULT_PARMS. It stores the actual allocation rule definitions.
  • OP_CUST_MST — The customer master table. It is queried by the op_cust_mst_c1 cursor to resolve CUST_ID from CO_CODE and CUST_NO, validating the customer and linking the allocation rule to the correct customer record.
  • IC_ITEM_MST — The item master table. It is referenced through the ALLOC_CLASS column type used for the p_alloc_class parameter, defining the allocation class from the item master schema.

Usage Notes

Because GMI_ALLOCATION_RULES_PVT is classified as a private (PVT) API, it is not intended for direct calls from external custom code. It is referenced by four other packages within the EBS codebase, which wrap or invoke its procedures to drive allocation rule resolution. Typical invocation scenarios include OPM allocation forms and concurrent programs that need to determine how quantities or costs should be allocated for a given customer, item class, and organization. The standard return status parameters allow callers to detect errors and surface messages through the AOL message dictionary. Developers extending or debugging allocation behavior should trace calls to GET_ALLOCATION_PARMS through the documented wrapper packages rather than invoking this private package directly, and should be mindful of the historical bug fixes noted in the header comments when comparing behavior across patch levels.