Search Results validate_query




Overview

APPS.JTF_FM_QUERY_LINK_PKG is a PL/SQL package body that supports the Foundation Management (FM) query-linking feature within Oracle E-Business Suite. Its documented file name is jtffmgqb.pls, and the packaged constants defined in the body include G_PKG_NAME (set to 'JTF_FM_QUERY_LINK_PKG') and G_VALID_LEVEL_LOGIN (initialized to FND_API.G_VALID_LEVEL_FULL), reflecting the standard Oracle API convention for controlling the level of validation and error propagation. The package resides in the APPS schema and carries an API classification of OTHER, indicating that it is a supporting utility package rather than a formal public API. Its business purpose is to associate—and disassociate—content records with saved queries in the Foundation Management repository, thereby enabling users to persist reusable, context-aware query definitions tied to specific content items.

Key Procedures and Functions

The ETRM metadata documents two procedures for this package:

  • LINK_CONTENT_TO_QUERY — Establishes the association between a content item and a saved FM query, effectively recording the relationship in the underlying query-mapping tables. It is the primary entry point for creating the linkage.
  • UNLINK_CONTENT_TO_QUERY — Removes an existing association between a content item and a query, reversing the operation performed by LINK_CONTENT_TO_QUERY.

The package body source further reveals several private utility procedures. Of particular relevance to the user's search for "get_error_message", the body declares GET_ERROR_MESSAGE, a private utility that retrieves the last error message from the FND message stack. Its logic initializes the output to NULL, counts the messages on the stack using FND_MSG_PUB.Count_Msg, and, if one or more messages exist, calls FND_MSG_PUB.Get with the latest message index (p_msg_index => l_count) to populate the outgoing message data. The body also declares private procedures ADD_ERROR_MESSAGE and PRINT_MESSAGE; within the shipped source, ADD_ERROR_MESSAGE is placeholder code that simply forwards its arguments to PRINT_MESSAGE, and PRINT_MESSAGE itself performs no action (its DBMS_OUTPUT.PUT_LINE call is commented out).

Tables Accessed

The package operates against two documented tables accessed through APPS synonyms:

  • JTF_FM_QUERIES_ALL — Stores the definitions of the Foundation Management queries themselves; the package references this table to resolve the query involved in each link or unlink operation.
  • JTF_FM_QUERY_MES — Holds the association records between queries and their linked content, and is the table written or deleted from by LINK_CONTENT_TO_QUERY and UNLINK_CONTENT_TO_QUERY respectively.

Error handling relies on the standard FND_MSG_PUB message stack rather than on package-specific tables.

Usage Notes

JTF_FM_QUERY_LINK_PKG is typically invoked from Oracle Forms or from custom PL/SQL code when a user saves, modifies, or removes a query linked to a content item. Because the package is classified as OTHER and its documented procedures are limited to the two link/unlink operations, it is not intended for direct external API calls; customizations should call the documented LINK_CONTENT_TO_QUERY and UNLINK_CONTENT_TO_QUERY procedures and rely on the FND message stack for error retrieval. The private GET_ERROR_MESSAGE procedure is not part of the public contract, so custom code should use FND_MSG_PUB.Get directly to obtain a message. Given the reference to jtffmgqb.pls version 120.0 (last modified 2005), the package is stable and behaves consistently across EBS 12.1.1 and 12.2.2. No other packages reference it, so its dependencies are limited to FND_MSG_PUB, FND_API, and the two JTF_FM tables.