Search Results set_allow_neg_inv
Overview
GMIUTILS is a shared utility package in the Oracle E-Business Suite Process Manufacturing (OPM) schema, owned by APPS and classified as an OTHER API. It centralizes low-level helper logic used across the OPM inventory and lot-conversion modules, including document number generation, inventory item resolution, and validation of negative inventory and lot status conditions. The package is declared AUTHID CURRENT_USER, meaning its unqualified object references resolve under the privileges of the calling session rather than the package owner.
A significant portion of the package originates from enhancement work delivered for Serono (Bug B3415691, 2004), which added the negative-inventory control routines and lot-status validation functions. The package header carries an "noship" designation (Version 115.5), indicating it is treated as an internal utility rather than a formally shipped public API, and it should be used with care by custom code.
Key Procedures and Functions
- GET_DOC_NO — Returns a document number for a given document type and organization code, with standard return-status, message-count, and message-data output parameters. It draws the sequence value from the document sequence setup.
- GET_INVENTORY_ITEM_ID — Resolves and returns the inventory item identifier from an item number, with an optional reset flag controlling cached lookup behavior. This originated from Bug#3071034.
- SET_ALLOW_NEG_INV — Captures and sets the current negative-inventory allowance state, used to temporarily override the profile-controlled setting during batch operations.
- RESTORE_ALLOW_NEG_INV — Restores the negative-inventory allowance state previously saved by SET_ALLOW_NEG_INV, typically invoked after a batch update completes.
- NEG_INV_CHECK — Returns a BOOLEAN indicating whether a proposed inventory movement is valid with respect to negative-inventory rules. It evaluates item, warehouse, lot, location, and quantity inputs to determine whether the transaction would drive inventory negative beyond the permitted threshold.
- LOT_STATUS_CHECK — Returns a BOOLEAN indicating whether a lot-status transition is permitted for the given item, warehouse, lot, location, document type, line type, transaction quantity, and target lot status.
The package also declares the global G_ALLOW_NEG_INV, initialized from the IC$ALLOWNEGINV profile option via NVL, establishing the default negative-inventory policy at package load time.
Tables Accessed
Through APPS synonyms, the package references IC_ITEM_MST_B and IC_ITEM_MST for item master information, MTL_SYSTEM_ITEMS and MTL_SYSTEM_ITEMS_B for inventory item attributes, SY_DOCS_SEQ for document sequence numbering, IC_LOCT_INV for location-level inventory balances, and IC_LOTS_MST and IC_LOTS_STS for lot master and lot-status definitions. These tables support item resolution, document numbering, and the quantity and status validations performed by NEG_INV_CHECK and LOT_STATUS_CHECK.
Usage Notes
GMIUTILS is typically invoked from OPM lot conversion and inventory transaction forms, and from other PL/SQL packages performing batch inventory updates. The SET_ALLOW_NEG_INV and RESTORE_ALLOW_NEG_INV pair is designed to bracket batch operations that must temporarily alter negative-inventory behavior. Because the package is flagged noship and is referenced by one other package, customizations should treat it as an internal dependency: callers must respect the current negative-inventory profile setting and should not assume a stable public interface across releases.
-
APPS.GMIUTILS SQL Statements
12.2.2
-
APPS.GMIUTILS SQL Statements
12.1.1
-
PACKAGE: APPS.GMIUTILS
12.1.1
-
PACKAGE: APPS.GMIUTILS
12.2.2
-
PACKAGE BODY: APPS.GMIUTILS
12.1.1
-
PACKAGE BODY: APPS.GMIUTILS
12.2.2