Search Results update_eni_staging_table
Overview
INV_ENI_ITEMS_STAR_PKG is an Oracle E-Business Suite package body owned by the APPS schema that maintains the STAR (Staged Transactional Aggregation Repository) item tables used by Oracle Inventory for the Enterprise Item (ENI) integration architecture. The package's stated purpose, as captured in its header comment, is to maintain the STAR table when changes are detected on MTL_ITEM_CATEGORIES. Category assignments in Inventory are otherwise decoupled from the denormalized STAR structures consumed by downstream reporting and integration, so this package closes that gap by propagating item/category assignment changes into the STAR layer. The $Header$ marker (INVENICB.pls 120.4.12020000.2, dated 2012/07/13) confirms the file is part of the Inventory ENI codebase shipped in the 12.1.1 and 12.2.2 releases. The body is classified as OTHER rather than a public API, indicating it is primarily an internal synchronization utility rather than an interface intended for direct customer invocation.
Key Procedures and Functions
ETRM documents four procedures in this package body:
- SYNC_CATEGORY_ASSIGNMENTS — This is the visible entry point in the excerpt. It accepts an API version, initialization flag, inventory item, organization, category set, and the old and new category identifiers, returning the standard API return status, message count, and message data out parameters. It first tests whether a standalone package named ENI_ITEMS_STAR_PKG exists and is valid using INV_ITEM_UTIL.Object_Exists, and only when the object is present does it delegate the synchronization to that package. An earlier dynamic-SQL implementation of the same delegated call was commented out under Bug 12416965 and replaced by a direct static call, improving performance and dependency tracking. A subsequent block, truncated in the excerpt, continues the same routine and tests INV_ITEM_UTIL.Object existence again, presumably to invoke further synchronization logic such as the category-set-specific path. This procedure is the routine referenced when category assignments on MTL_ITEM_CATEGORIES are inserted, updated, or deleted.
- UPDATE_ENI_STAGING_TABLE — The procedure directly matching the user's search term. It is the staging-table maintenance routine: it refreshes the ENI staging table that fronts the STAR item structures so that pending item/category changes are reflected before the STAR records themselves are updated. In practice this is the workhorse called by the synchronization procedures after change detection.
- SYNC_STAR_ITEMS_FROM_IOI — Synchronizes the STAR item table from IOI, the Oracle Items Open Interface or item-organization-interface staging structure, so that newly loaded or changed items reach the STAR representation.
- SYNC_STAR_ITEMCATG_FROM_COI — Synchronizes the STAR item-category relationship table from COI, the category open interface source, propagating category associations into the STAR item-category table.
Tables Accessed
The metadata does not enumerate APPS-synonym table references for this package body. On the basis of the procedure semantics and the package's stated purpose, the principal table involved is MTL_ITEM_CATEGORIES, which the package observes for changes and reconciles into the STAR tables. The staging and STAR tables manipulated by UPDATE_ENI_STAGING_TABLE and the two SYNC_STAR procedures are the internal ENI/STAR item and item-category tables populated from the IOI and COI interfaces. INV_ITEM_UTIL is referenced as a utility dependency for object-existence checks rather than as a data table.
Usage Notes
INV_ENI_ITEMS_STAR_PKG is referenced by four other packages, which is consistent with its role as a shared synchronization service rather than a top-level API. It is typically invoked indirectly: Inventory forms and the item/category maintenance flows trigger the callers that detect a change on MTL_ITEM_CATEGORIES and then invoke SYNC_CATEGORY_ASSIGNMENTS, which in turn drives UPDATE_ENI_STAGING_TABLE and the SYNC_STAR procedures. Custom code should treat these routines as internal; because the body guards its delegation with INV_ITEM_UTIL.Object_Exists, the ENI_ITEMS_STAR_PKG package must be deployed and valid for the synchronization to have effect. Releases prior to the Bug 12416965 fix used dynamic SQL for the delegated call, so behavior and error reporting differ subtly between older code levels and the 120.4.12020000.2 version shipped in 12.1.1 and 12.2.2.