Search Results p_set_id




Overview

CS_KB_SEARCH_PVT is a private PL/SQL package body owned by the APPS schema in Oracle E-Business Suite Release 12.1.1 and 12.2.2. As indicated by its name and its classification as a Private (PVT) API, it supports the Knowledge Base (KB) search functionality delivered within the Service (CS) product family. The Knowledge Base is the repository of solution articles and reference material used by support agents and self-service users to resolve service requests.

The package encapsulates logic that, in the ETRM 12.2.2 metadata, is exposed through a single documented function: GET_SET_USAGE_COUNT. Its purpose is to return usage statistics for a knowledge set, allowing the application to rank, filter, or display sets based on how frequently they have been used. The package body reflects a small, focused helper module that supports broader KB search and set-selection processing rather than a full public API. Because it is classified as PVT, it is intended for internal consumption by other service modules rather than direct invocation by external integrations.

Key Procedures and Functions

  • GET_SET_USAGE_COUNT — Returns a numeric usage count for a given knowledge set. The function accepts a set identifier (p_set_id, as reflected in the source header) and returns the aggregated usage total associated with that set. When the set identifier is null, the function returns zero without querying. The body opens an explicit cursor keyed by the set identifier, fetches the summed usage value, and closes the cursor. Any runtime exception is trapped by a WHEN OTHERS handler that returns zero, ensuring that calling search logic degrades gracefully rather than failing when usage data is unavailable.

The cursor joins the set-level usage summary to the usage summary definitions table, restricting results to the definition flagged as the default (default_flag = 'Y'). This indicates the function reports a single, canonical usage measure rather than every possible metric that may be defined for a set. The use of NVL ensures a zero result is returned when no summary row exists.

Tables Accessed

  • CS_KB_SET_USED_SUMS — Stores the accumulated usage counters per knowledge set and usage definition. It supplies the used_count value and is filtered by set_id.
  • CS_KB_USED_SUM_DEFS_B — Holds the definitions of the available usage summary metrics. The join on def_id, combined with the default_flag = 'Y' predicate, selects the definition designated as the default usage measure.

Both tables are referenced through APPS synonyms, consistent with the package's APPS ownership. The metadata records no write operations; the package performs read-only access.

Usage Notes

Because CS_KB_SEARCH_PVT is a private package referenced by zero other documented packages in the ETRM metadata, its exposure is limited in the shipped 12.2.2 data model. In practice, such helpers are invoked by sibling knowledge-management modules or by the Knowledge Base search UI to compute and display set usage metrics. Typical invocation paths include Service/Knowledge Base forms and self-service KB pages that present ranked or annotated knowledge sets.

Customizations should treat the function as an internal read-only helper: callers should pass a valid set identifier and expect a numeric result, with zero returned for null input or on error. Direct modification of the underlying summary tables is not performed by this package, so usage counters must be maintained by the processes that populate CS_KB_SET_USED_SUMS. Any custom code depending on the default-flag filter should verify that exactly one definition is marked as default, since the function fetches a single row.