Search Results get_contexts




Overview

FND_DFLEX is a PL/SQL package body owned by the APPS schema that provides an internal programmatic interface to Oracle E-Business Suite's Descriptive Flexfield (DFF) metadata. Descriptive flexfields allow applications to extend standard forms with customer-specific attribute segments without modifying the underlying database schema. FND_DFLEX supplies the runtime and utility logic that other EBS components use to resolve flexfield definitions, enumerate contexts, and interrogate segment structures — effectively exposing the descriptive flexfield repository through a callable API rather than direct table access.

In Oracle EBS 12.1.1 and 12.2.2, the package is classified as API classification "OTHER" in the ETRM repository and holds VALID status. Its documented dependencies include FND_APPLICATION, FND_APPLICATION_VL, FND_DESCRIPTIVE_FLEXS_VL, FND_DESCR_FLEX_COL_USAGE_VL, FND_DESCR_FLEX_CONTEXTS, FND_DESCR_FLEX_CONTEXTS_VL, and the FND_DFLEX specification itself. The package body is not referenced by any database object directly, but the specification is referenced by 56 other packages across the E-Business Suite, indicating it functions as a widely consumed low-level service.

Key Procedures and Functions

The ETRM metadata documents six procedures and functions within the FND_DFLEX package body:

  • GET_FLEXFIELD — Returns the definition of a descriptive flexfield. It resolves the flexfield using its application and flexfield name or title, providing callers with the identifying attributes needed to work with that flexfield at runtime.
  • GET_CONTEXTS — Retrieves the set of contexts defined for a given descriptive flexfield. Contexts are the structural mechanism by which DFFs present different segment sets depending on the business situation, such as a transaction type or entity category.
  • MAKE_CONTEXT — Creates or initializes a flexfield context record, supporting the programmatic construction of context definitions used during runtime resolution or configuration utilities.
  • GET_SEGMENTS — Returns the segments belonging to a flexfield or a specific context. This is fundamental for form-based DFF rendering and for validating segment values on data entry.
  • TEST — A diagnostic or validation routine used to confirm flexfield configuration and behavior. It is typically invoked during development or troubleshooting rather than in production transactions.

No parameter lists are documented in the ETRM excerpt; callers must consult the package specification in the target environment for exact signatures.

Tables Accessed

The package body reads from the core descriptive flexfield metadata tables, principally FND_DESCRIPTIVE_FLEXS_VL (flexfield definitions), FND_DESCR_FLEX_CONTEXTS and FND_DESCR_FLEX_CONTEXTS_VL (context definitions), FND_DESCR_FLEX_COL_USAGE_VL (segment-to-column usage mapping), and FND_APPLICATION / FND_APPLICATION_VL (application identity and naming). These are accessed through APPS-owned synonyms. The queries are read-oriented, consistent with a metadata retrieval API. The interplay of these tables supplies the complete descriptive flexfield picture: which application owns it, which contexts exist, and which segments map to which database columns.

Usage Notes

FND_DFLEX is an internal, low-level package rather than a public, versioned API. It is invoked primarily by other EBS packages (documented as referenced by 56 packages) and by Oracle Forms-based descriptive flexfield runtime logic. Custom code should generally avoid calling FND_DFLEX directly and instead use the supported FND_DESCR_FLEX APIs, since internal packages may change between releases. When troubleshooting DFF behavior — missing contexts, incorrect segment mapping, or validation failures — developers can examine FND_DFLEX behavior to understand the metadata resolution path. In 12.1.1 and 12.2.2 environments, verification of package validity and dependency status should precede any reliance on its procedures, as the surrounding metadata tables are shared infrastructure used by all DFF-enabled forms and concurrent programs.