Search Results check_list_duplicate




Overview

BEN_CACHE is a PL/SQL package owned by APPS that provides the in-memory caching infrastructure used throughout the Oracle EBS Advanced Benefits (BEN) module. In both release 12.1.1 and 12.2.2, the package is declared with AUTHID CURRENT_USER, meaning that name resolution and privilege checking for unqualified references are performed against the schema of the invoking session rather than the package owner. This design allows BEN forms, concurrent programs, and dependent APIs to share a common, session-level cache without requiring direct object grants to APPS-owned structures.

The package defines a family of PL/SQL record and collection types — g_cache_lookup, g_cache_lookup_table, IdRecType, IdType, TabDetRecType, TabDetType, InstColNmRecType, InstColNmType, CurParmRecType, and CurParmType — together with global variables such as g_tabdet_set, g_instcolnm_set, g_curparm_set, and g_id_set. These structures hold table definitions, column-to-cache-column mappings, cursor parameters, and identifier sets that benefit processing logic reuses repeatedly during a transaction or form session. The ETRM classification for the package is OTHER, reflecting its role as a utility layer rather than a business-facing API.

Key Procedures and Functions

ETRM 12.2.2 documents three procedures or functions within BEN_CACHE:

  • WRITE_MASTDET_CACHE — Populates a master-detail cache. It is the primary writer for the package globals that hold master and detail row data, allowing later lookups to be satisfied from memory rather than repeated queries. The header comment < Write_MastDet_Cache > in the package specification confirms its intended role.
  • WRITE_BGP_CACHE — Populates the cache structures used by Benefit Group (BGP) processing. It follows the same write-once, read-many pattern as WRITE_MASTDET_CACHE but targets the benefit group data set.
  • CHECK_LIST_DUPLICATE — Tests whether a candidate entry already exists in a cache list, returning a duplicate indicator. This is the routine most commonly associated with the search term check_list_duplicate. It guards callers against inserting or processing records that are already present in the cached collection, preventing redundant processing and duplicate rows.

Parameter lists are deliberately omitted here; the documented metadata names only these three entry points.

Tables Accessed

The only table referenced through APPS synonyms in the documented metadata is PLITBLM. PLITBLM is the PL/SQL integer table used by Oracle Forms and the Oracle Application Object Library to pass integer lists between the form and the database. BEN_CACHE’s reliance on it is consistent with its role: identifier sets built in the middle tier are materialized into PLITBLM for set-based processing. No base BEN tables are directly recorded in the metadata, because the cache package is designed to be populated by callers and to serve reads from its own PL/SQL collections.

Usage Notes

BEN_CACHE is an internal utility. The metadata records that it is referenced by 19 other packages, indicating broad reuse across the Benefits module. It is typically invoked from BEN forms and from concurrent programs that need to avoid repeated round trips to the database for the same reference data. Custom code should treat the package as unsupported for direct invocation: callers must not assume that the global collections persist across commits, that they are populated without a prior WRITE_* call, or that CHECK_LIST_DUPLICATE’s duplicate test is meaningful before the relevant list has been loaded. Because of the AUTHID CURRENT_USER declaration, any custom schema invoking BEN_CACHE must itself hold privileges on the underlying objects, and caching behavior may differ between 12.1.1 and 12.2.2 forms sessions. Standard practice is to invoke the package indirectly through the supported Benefits APIs and forms rather than calling its procedures directly.