Search Results is_lot_attributes_required
Overview
APPS.INV_LOT_SEL_ATTR is a PL/SQL package in Oracle E-Business Suite that governs the selection, validation, and display of descriptive flexfield (DFF) attributes associated with lot and serial number records in Oracle Inventory. The package is declared with AUTHID CURRENT_USER, meaning that all dynamic SQL and database object references resolve against the privileges of the invoking session rather than the package owner. Its internal header identifies it as INVLSDFS.pls, last shipped in the 120.4 revision dated 2010/12/20.
The package is central to the lot and serial number entry experience. When a user enters lot or serial attributes in an Inventory form or through a public API, this package determines which attributes are enabled, which of those are mandatory, what default values apply, and how the attribute context is resolved from the item and organization. It also exposes a record type, LOT_SEL_ATTRIBUTES_REC_TYPE, that models each attribute column together with its name, type, default value, required flag, prompt, and column length, along with collection types for numeric, date, and character attribute arrays drawn from MTL_LOT_NUMBERS.
Key Procedures and Functions
The ETRM metadata documents sixteen procedures and functions. GET_CONTEXT_CODE resolves the descriptive flexfield context code for a given organization, item, and flexfield name, with an overload that additionally accepts a lot or serial number. IS_ENABLED returns a status indicator describing whether a flexfield has enabled segments (0 for none, 1 for enabled but optional, 2 for enabled and required). IS_DFF_REQUIRED and IS_LOT_ATTRIBUTES_REQUIRED provide focused checks on whether descriptive flexfield data is mandatory for the transaction at hand.
IS_CONTEXT_DISPLAYED determines whether a context field should be rendered. IS_ENABLED_SEGMENT evaluates an individual segment. GET_DELIMITER returns the delimiter used when concatenating flexfield segments. GET_DEFAULT retrieves the default value for an attribute. GET_ATTRIBUTE_VALUES, GET_INV_LOT_ATTRIBUTES, and GET_INV_SERIAL_ATTRIBUTES assemble attribute data sets for lot and serial records respectively. GET_LOT_SERIAL_CONTEXT, GET_DFLEX_CONTEXT, and GET_DFLEX_SEGMENT decompose context and segment metadata. LOCK_LOT_RECORDS, the object of the user's search, is the procedure that places a lock on the specified lot records, typically to serialize concurrent updates and prevent conflicting attribute assignments during validation or generation.
Tables Accessed
The package reads and writes MTL_LOT_NUMBERS, the primary repository of lot attribute values, and MTL_SERIAL_NUMBERS with its temporary counterpart MTL_SERIAL_NUMBERS_TEMP. Flexfield configuration is resolved through FND_FLEX_VALIDATION_TABLES, FND_FLEX_VALUE_SETS, and MTL_FLEX_CONTEXT. Item and category context is derived from MTL_SYSTEM_ITEMS_B and MTL_ITEM_CATEGORIES. Metadata about available attribute columns is obtained from ALL_TAB_COLUMNS and USER_SYNONYMS, while DBMS_SQL, DUAL, and PLITBLM support dynamic query construction and PL/SQL table handling.
Usage Notes
INV_LOT_SEL_ATTR is invoked primarily from Oracle Inventory lot and serial entry forms, from the lot and serial public APIs, and from concurrent programs that validate or migrate lot attribute data. Custom code extending lot attribute behavior should call the documented procedures rather than querying MTL_LOT_NUMBERS directly, because the package encapsulates flexfield context rules that vary by item, organization, and DFF configuration. The metadata records that twenty-one other packages reference this package, confirming its role as a shared utility across inventory and receiving flows.