Search Results create_set_and_elements




Overview

CS_KNOWLEDGE_PUB is the public API package for Oracle E-Business Suite's Knowledge Management functionality within the Service (Customer Service) application. It exposes procedures that allow both Oracle's own forms and external callers to interact with the knowledge base repository, primarily by constructing text-based search queries and by assembling structured knowledge "sets" and their constituent elements. The package body is registered as a PUBLIC API classification in ETRM, indicating that it is the sanctioned integration point for customers and partners building extensions on top of Oracle Knowledge Management.

The header comment ($Header: cspkbb.pls 115.13 2003/12/04) reflects a long-lived package that originated in the 11i era and remains present through EBS 12.1.1 and 12.2.2. It follows Oracle's standard API conventions: the FND_API compatible-call check, the G_EXC_ERROR / G_EXC_UNEXPECTED_ERROR / G_EXC_UNEXPECTED_ERROR exception ladder, savepoint-based rollback, and the FND_MSG_PUB message stack. Version 1.0 is the declared API version.

Key Procedures and Functions

  • CONSTRUCT_TEXT_QUERY — Builds a query string suitable for the knowledge search engine from a raw user-supplied query string plus a search-option indicator. The procedure validates the caller's API version, initialises the message list if requested, then delegates the actual parsing work to the private group package CS_KNOWLEDGE_GRP.Construct_Text_Query. The resulting query string is returned to the caller via an OUT parameter. It uses a savepoint (Const_Text_Qry_PUB) and rolls back on any error.
  • CREATE_SET_AND_ELEMENTS — Creates a knowledge set together with its member elements in a single API call. This is the procedure matched by the user's search term "create_set_and_elements". It provides a transactional wrapper so that a set and all of its elements are either committed together or rolled back together, maintaining referential integrity between the parent set and its child elements.

Both procedures adhere to the FND_API signature pattern: a leading API-version parameter, p_init_msg_list, an optional p_commit, the paired OUT parameters x_return_status, x_msg_count and x_msg_data.

Tables Accessed

The ETRM metadata does not enumerate the underlying base tables, and the excerpt shows calls routed through CS_KNOWLEDGE_GRP rather than direct DML. In practice the knowledge-publication layer writes to the CS_KNOWLEDGE_* family of tables — the set header and the set-element detail tables — through those APPS synonyms, while the text-query procedure performs no persistent writes. The use of savepoints rather than direct COMMIT confirms that transaction boundaries are controlled by the API layer.

Usage Notes

CS_KNOWLEDGE_PUB is referenced by five other PL/SQL packages, confirming its role as a shared dependency rather than a leaf module. It is typically invoked from the Oracle Knowledge Management service forms, from concurrent programs that bulk-load or refresh knowledge content, and from custom PL/SQL code that needs to create sets with their elements programmatically. Callers must pass a compatible p_api_version and always inspect x_return_status; message details should be retrieved from FND_MSG_PUB when the status is not G_RET_STS_SUCCESS, since the package rolls back to its internal savepoint on error and surfaces diagnostics only through the standard message stack.