Search Results check_item_attributes




Overview

INV_LOT_API_PKG is the Oracle E-Business Suite lot number validation and maintenance API within the Inventory (INV) module. It provides the programmatic interface through which callers create, validate, and delete lot records in the MTL_LOT_NUMBERS table, and through which they verify that a lot and its attributes conform to the item and organization setup defined in Oracle Inventory. In EBS 12.1.1 and 12.2.2 the package operates against the APPS schema and is classified generically as an OTHER API, indicating it is not a formal public interface but is nevertheless widely reused by Oracle forms, concurrent programs, and custom extensions that need lot-level edit checks without invoking a full inventory transaction.

The package is invoked internally by the Inventory transaction managers to support lot-controlled and child-lot-controlled items, and it is referenced by three other packages in the ETRM repository. Because it manipulates MTL_LOT_NUMBERS directly, it is the authoritative point of record for lot attribute validation before a transaction is committed.

Key Procedures and Functions

Seven documented entry points are exposed by the package body:

  • CHECK_EXISTING_LOT_DB — confirms whether a lot already exists in the database for the given item and organization, preventing duplicate lot creation.
  • VALIDATE_LOT_ATTRIBUTES — validates the lot attributes supplied by the caller against the item's lot control and child lot control settings in MTL_SYSTEM_ITEMS, returning success or error status through the standard FND_API return variables.
  • VALIDATE_ADDITIONAL_ATTR — validates supplementary lot attributes beyond the core number, such as grade, status, expiration, and descriptive flexfield segments.
  • SET_MSI_DEFAULT_ATTR — populates default lot attributes derived from the item definition in MTL_SYSTEM_ITEMS, ensuring that lot records inherit item-level defaults.
  • POPULATE_LOT_RECORDS — assembles and returns the lot record structures used during lot creation and update operations.
  • DELETE_LOT — removes a lot number from MTL_LOT_NUMBERS, subject to the transactional integrity rules enforced by Inventory.

The package body also contains the private helper procedure CHECK_ITEM_ATTRIBUTES, which opens a cursor on MTL_SYSTEM_ITEMS to confirm the item exists and to retrieve its lot_control_code and child_lot_flag. When the item is not found, the procedure sets the return status to error, raises FND_INVALID_ITEM, and stops processing via fnd_api.g_exc_error. The internal PRINT_DEBUG procedure writes trace messages to INV_MOBILE_HELPER_FUNCTIONS.TRACELOG when the g_debug flag is enabled.

Tables Accessed

The package reads and writes the following objects through APPS synonyms:

Usage Notes

INV_LOT_API_PKG is typically invoked from Oracle Inventory lot entry forms, from the Inventory transaction interface, and from custom PL/SQL that performs lot validation before calling INV_TRANSACTIONS_PUB or an equivalent transaction API. Callers must supply the standard FND_API parameters (x_return_status, x_msg_count, x_msg_data) and should check x_return_status for g_ret_sts_error before proceeding. Because the package writes directly to MTL_LOT_NUMBERS and to transaction interface tables, it should be called within a transaction boundary controlled by the caller. The presence of a search term such as "validate_lot_attr_in_param" reflects common naming variations encountered when locating lot attribute validation logic; the documented procedure that performs this function is VALIDATE_LOT_ATTRIBUTES. All calls should be made against the APPS schema, and the package should not be modified, as it is an Oracle-owned object.