Search Results g_lifecycle_phase_id
Overview
EGO_ITEM_COMPARE_PKG is an Oracle E-Business Suite PL/SQL package body owned by the APPS schema and classified under the ETRM taxonomy as OTHER. It belongs to the EGO (Enterprise Global Order / Product Information Management) module family, which governs item master data and the attribute frameworks used to describe, categorize, and compare items across the enterprise. The package's principal business purpose is to resolve and compare item attribute values — including user-defined attributes and translated (code-to-meaning) system attributes — so that two items, or an item against a comparison context, can be programmatically evaluated without requiring the calling form to reimplement attribute resolution logic.
The header comment ($Header: EGOPICMB.pls 120.6 2007/08/06) and internal constants reveal a package that supports the Item Catalog / item comparison UI. A set of global constants (G_ITEM_TYPE, G_PRIMARY_UOM, G_CATALOG_GROUP_ID, G_LIFECYCLE_ID, G_LIFECYCLE_PHASE_ID, G_APPROVAL_STATUS, G_STYLE_FLAG, G_STYLE_ITEM, G_TRADE_ITEM_DESCRIPTOR, among others) enumerate the columns whose stored code values must be translated into display meanings. The package also exposes session context variables (G_USER_ID, G_LOGIN_ID, G_PROG_APPID, G_PROG_ID, G_REQUEST_ID) and a language setting (G_SESSION_LANG from USERENV('LANG')) used to render error and display messages in the correct locale. A G_LINE_NUM counter supports error logging into the IDC_DEBUG table. A PL/SQL associative array type is declared to hold concatenated item segment strings.
Key Procedures and Functions
The ETRM metadata documents two public program units in this package body:
- GET_ITEM_ATTR_VAL — Retrieves the value of a specified item attribute for a given item, applying any required code-to-meaning translation for the attribute in question. This is the general-purpose accessor used by the comparison logic to obtain the item-side value of a comparison pair.
- GET_USER_ATTR_VAL — Retrieves the value of a user-defined (flexfield-style) item attribute for a given item. User attributes are not fixed columns on the item master; they are defined through the attribute group and data-level framework, which is why the package reads the EGO attribute-group and data-level tables to resolve the correct value. The function name is the specific object a user searching for "get_user_attr_val" would encounter.
The package additionally contains internal helper functions such as Get_Item_Type_Disp_Val and Get_Primary_UOM_Disp_Val, which the header notes must be declared before the calling functions. Neither parameter lists nor return types are reproduced here.
Tables Accessed
The package accesses the following objects through APPS synonyms:
- MTL_SYSTEM_ITEMS_B / MTL_SYSTEM_ITEMS_VL — the item master base and view, supplying core item attributes and the concatenated segment string used to identify an item.
- MTL_UNITS_OF_MEASURE_TL — resolves the primary UOM code to its translated unit-of-measure name.
- EGO_ATTR_GROUP_DL — the attribute group data-level table, defining which attribute groups and user attributes apply to an item.
- EGO_DATA_LEVEL_B — the base data-level table, establishing the attribute data-level hierarchy used by
GET_USER_ATTR_VALto locate the correct user-attribute value. - FND_LOOKUP_VALUES — resolves coded lookup values (item type, lifecycle, approval status, allowed-units lookup code, and similar enumerations) into their display meanings.
- FND_FORM_FUNCTIONS — used to check function-level security or resolve function metadata associated with the calling context.
- DBMS_SQL — dynamic SQL is used, most likely to construct queries over user-attribute columns whose names are not known at compile time.
Usage Notes
EGO_ITEM_COMPARE_PKG is a form-support package rather than a concurrent-program entry point. It is invoked in the context of the EGO item comparison and item catalog screens, where item attribute values must be fetched, translated, and displayed side by side. The session globals (G_USER_ID, G_LOGIN_ID, G_PROG_APPID, G_PROG_ID, G_REQUEST_ID) follow the standard EBS pattern of an initialization routine called from a form's WHEN-NEW-FORM-INSTANCE trigger, ensuring that error logging and security checks carry the correct session context.
Because the package is not referenced by other packages, custom code should treat it as a UI-layer utility rather than a reusable integration API. Callers requiring item attribute values for integration purposes should prefer the public EGO item APIs; callers replicating item comparison behavior in a custom form may call GET_ITEM_ATTR_VAL and GET_USER_ATTR_VAL directly, but must first establish the session globals and language setting. The package behaves consistently across Oracle EBS 12.1.1 and 12.2.2, as its dependencies (MTL, EGO data-level, and FND lookup tables) share the same structures in both releases.