Search Results g_miss_xxx




Overview

GMI_ALLOCATION_RULES_PVT is a private PL/SQL package owned by the APPS schema in Oracle Process Manufacturing (OPM), part of the Oracle E-Business Suite 12.1.1 and 12.2.2 code lines. It encapsulates the retrieval logic for the automatic allocation rules that govern how OPM inventory is reserved and allocated against order and shipment lines. The package header explicitly describes its role as containing "private procedures to retrieve the rules established for auto-allocation" and "private procedures controlling auto-allocation of OPM inventory against order/shipment lines." Its source file, GMIVALRS.pls, carries a 1999 copyright attributed to the TVP, Reading, England development group, with a 2005 revision header (120.0). The package is declared with AUTHID CURRENT_USER and is classified as PVT in the ETRM data model, meaning it is not a public API and is not designed for direct customer invocation. Instead, it is consumed internally by higher-level OPM allocation logic, and is referenced by four other packages that depend on its rule-lookup capability.

Key Procedures and Functions

The package exposes two documented procedures, both of which return allocation parameter data rather than performing allocation writes.

  • GET_ALLOCATION_PARMS — Retrieves the allocation parameters applicable to a specific business context. The caller supplies identifying criteria such as company code, customer number, allocation class, ordering customer ID, ship-to organization ID, and operating unit/organization ID. The procedure returns a status indicator, a message count and message data for error handling, and a full OP_ALOT_PRM%ROWTYPE structure containing the resolved allocation control settings. Optional inputs carry default NULL values, allowing callers to leave criteria unconstrained.
  • GET_DEFAULT_PARMS — Returns the default allocation parameter record as an OP_ALOT_PRM%ROWTYPE output. This provides the baseline auto-allocation settings used when no specific rule set can be resolved for the supplied context.

Both procedures are declared with the NOCOPY hint on their OUT parameters, reflecting a performance-conscious design for an internally and frequently invoked utility.

Tables Accessed

Three tables, accessed through APPS synonyms, underpin the package's rule resolution:

  • OP_ALOT_PRM — The allocation parameters (auto-allocation rules) master in OPM. This is both the source of the resolution criteria and the structure returned to callers via the x_op_alot_prm parameter.
  • IC_ITEM_MST — The OPM item master. The ALLOC_CLASS column supplies the allocation class used to match item-level rules.
  • OP_CUST_MST — The OPM customer master. Columns such as CO_CODE and CUST_NO provide the customer dimensions against which allocation rules are qualified.

The package is read-only with respect to these tables; it resolves and returns configuration rather than maintaining it.

Usage Notes

Because GMI_ALLOCATION_RULES_PVT is a private package, it is invoked indirectly by OPM order-management, shipping, and inventory allocation flows whenever default allocation parameters must be determined for a shipment or order line. Typical entry points are the four dependent packages identified in the ETRM metadata, which call GET_ALLOCATION_PARMS to obtain context-specific rules and fall back to GET_DEFAULT_PARMS when a specific rule cannot be resolved.

A notable implementation detail relates to the search term "g_miss_xxx." Bug fix 2643440 removed the initialization of G_MISS_XXX global constants from the parameters p_co_code, p_cust_no, p_alloc_class, p_of_cust_id, p_ship_to_org_id, and p_org_id. This means callers must now supply explicit NULL defaults rather than relying on the package's former sentinel values, and any legacy custom code that depended on G_MISS_XXX being set by this package should be reviewed. Customizations should not call the package directly; instead they should use the supported public OPM allocation APIs that wrap it, ensuring compatibility across 12.1.1 and 12.2.2 patches.