Search Results kff_str_type




Overview

The APPS.FND_FLEX_XML_PUBLISHER_APIS package body is a server-side PL/SQL utility within the Oracle E-Business Suite 12.1.1 and 12.2.2 codebase. Its primary business function is to expose the metadata and query-building primitives required to render and report against Key Flex Fields (KFFs) through Oracle XML Publisher (BI Publisher). Rather than duplicating flexfield structure knowledge inside each report, the package centralizes the logic that interrogates the Flexfield definition tables and emits the metadata, SELECT clauses, WHERE predicates, and ORDER BY fragments that XML Publisher data templates and concurrent programs consume.

The package is classified as an "OTHER" API and resides in the APPS schema with VALID status. It does not implement a business transaction flow; instead it acts as a reusable services layer over the Oracle Flexfields infrastructure, bridging the generic KFF engine and the reporting layer. The documented package carries no outgoing references to calling objects at the dependency level, meaning it is a leaf utility invoked by reporting and metadata-generation consumers rather than a component of a larger dependency chain.

Key Procedures and Functions

The ETRM documentation lists ten public procedures and functions. Their documented purposes are as follows:

  • SET_DEBUG_MODE — Enables or disables the internal debug flag used to trace package execution during troubleshooting.
  • GET_DEBUG — Returns the current value of the debug flag set by SET_DEBUG_MODE.
  • KFF_FLEXFIELD_METADATA — Returns metadata describing a Key Flexfield as a whole, such as its identifying application and flexfield code, for consumption by the reporting layer.
  • KFF_STRUCTURE_METADATA — Returns metadata describing a specific flexfield structure (the ID flex structure) associated with a KFF.
  • KFF_SEGMENT_METADATA — Returns metadata describing an individual segment belonging to a flexfield structure.
  • KFF_SEGMENTS_METADATA — Returns metadata describing the complete set of segments for a structure, supporting bulk retrieval rather than per-segment calls.
  • KFF_SELECT — Constructs the SELECT clause fragment required to retrieve flexfield combination data in an XML Publisher query.
  • KFF_WHERE — Constructs the WHERE clause fragment used to restrict flexfield combination data according to segment criteria.
  • KFF_ORDER_BY — Constructs the ORDER BY clause fragment used to sequence flexfield segment output.
  • PROCESS_KFF_COMBINATION_1 — Processes a KFF combination record, handling the concatenated or formatted representation of segment values for output.

Collectively these procedures allow a report definition to be generated dynamically from flexfield metadata instead of being hard-coded, which is essential because KFF structures and segment configurations vary by implementation and can change without code modification.

Tables Accessed

The package reads from the core Oracle Flexfields and Application Object Library definition tables through APPS synonyms. FND_ID_FLEXS, FND_ID_FLEX_STRUCTURES, and FND_ID_FLEX_SEGMENTS supply the flexfield, structure, and segment definitions, while FND_ID_FLEX_SEGMENTS_TL provides the translated segment prompt and description text. FND_FLEX_VALUE_SETS supplies the value set information attached to each segment, and FND_SEGMENT_ATTRIBUTE_TYPES together with FND_SEGMENT_ATTRIBUTE_VALUES provide the descriptive flexfield-style attributes and their assigned values. FND_APPLICATION identifies the owning application, and FND_TABLES and FND_COLUMNS provide the underlying table and column metadata used to construct SQL fragments. PLITBLM is referenced as the standard PL/SQL table type used for passing collections of metadata or SQL fragments. The package also depends on the code-based utilities FND_FLEX_KEYVAL, FND_FLEX_SERVER, FND_FLEX_SERVER1, FND_DATE, FND_NUMBER, FND_PLSQL_CACHE, and FND_GLOBAL for value validation, server-side flexfield logic, date and number formatting, caching, and session context respectively.

Usage Notes

This package is typically invoked from XML Publisher data templates, concurrent program report logic, and custom PL/SQL that needs to build flexfield-aware SQL at runtime. It is also reachable from Oracle Forms through the flexfield server mechanism and from other packages in the APPS schema. Because it depends on FND_GLOBAL for session context and on the flexfield definition tables for metadata, correct behavior requires that the calling session be initialized with an application and responsibility, and that the relevant flexfield structures be compiled and frozen. Developers extending reports should treat the metadata and clause-builder procedures as the supported interface and treat the internal helper dependencies as private implementation. The package is documented as referenced by twenty-six other database objects, confirming its role as a shared reporting utility rather than an application-specific component.