Search Results create_context




Overview

APPS.FF_FUNCTION_CONTEXT_USG_API is a public Oracle E-Business Suite API classified by ETRM as an API. It belongs to the Oracle Application Object Library (AD) function-securing framework, a key component of the Function Security model that governs which functions a user may access within Oracle EBS 12.1.1 and 12.2.2. The package manages records in FF_FUNCTION_CONTEXT_USAGES, which associates a registered function (identified by p_function_id) with a function context (identified by p_context_id). Function contexts allow the same function to be exposed under different conditional or organizational contexts, and the sequence_number stored on each usage row controls the order in which contexts are evaluated or presented for a given function.

The package body follows the standard Oracle EBS API architecture, delegating business logic to a row handler (ff_fcu_ins) and invoking Before and After Process user hooks (FF_FUNCTION_CONTEXT_USG_BK1.CREATE_CONTEXT_b and CREATE_CONTEXT_a). This structure allows customers to extend or override behavior without modifying Oracle-owned code, which is a central design tenet of the EBS API layer.

Key Procedures and Functions

ETRM documents three procedures in this package:

  • CREATE_CONTEXT — Creates a new association between a function and a context. The procedure accepts a function identifier and a context identifier, and returns the generated sequence number and object version number to the caller. It issues a savepoint before processing, calls the Before Process user hook, performs validation in addition to standard row-handler checks, invokes the row handler ff_fcu_ins.ins to perform the physical insert, and finally calls the After Process user hook. A p_validate parameter allows the caller to run the API in validation-only mode without committing the insertion.
  • UPDATE_CONTEXT — Modifies an existing function/context usage record, typically to change the context assignment or the sequence number. As with CREATE_CONTEXT, the update path flows through the corresponding Before Process and After Process user hooks and a row handler, and it relies on the object version number for optimistic concurrency control.
  • DELETE_CONTEXT — Removes a function/context usage record. The delete path follows the same hook and row-handler pattern, ensuring that any customer-specific logic attached to the usage record is executed consistently across all three lifecycle operations.

The uniform p_validate, p_object_version_number, and user-hook pattern across the three procedures reflects the consistent, predictable behavior expected of Oracle EBS APIs.

Tables Accessed

The package operates on a single documented table, FF_FUNCTION_CONTEXT_USAGES, accessed through an APPS synonym. This table stores the relationship between functions and contexts. Key columns referenced by the API include function_id, context_id, sequence_number, and object_version_number. The sequence_number determines evaluation or display order, while object_version_number enforces optimistic locking so that concurrent updates to the same usage record are detected rather than silently overwritten. The package does not directly manipulate the underlying function or context definition tables; referential integrity is enforced by the row handler layer.

Usage Notes

FF_FUNCTION_CONTEXT_USG_API is invoked whenever function/context usage data must be created, changed, or removed through a supported interface. Typical callers include the Oracle Forms-based Function Security administration screens, concurrent programs that bulk-load or migrate function security definitions, and custom code that programmatically configures context assignments during implementation or upgrade. ETRM records that the package is referenced by one other package, indicating that it participates in a dependent call chain within the AD security framework. Because it is a public API, customers should call CREATE_CONTEXT, UPDATE_CONTEXT, and DELETE_CONTEXT directly rather than inserting into or deleting from FF_FUNCTION_CONTEXT_USAGES with native SQL, thereby ensuring that validation logic, sequence-number generation, object-version increments, and user hooks execute correctly. When integrating in a custom PL/SQL routine, callers should pass p_validate set to true first to verify that the intended change will succeed, then invoke the API with p_validate set to false and commit explicitly. Note that DML performed through this API affects global function security configuration and should be tested thoroughly in a non-production environment before release.