Search Results fetch_bg_formula_id
Overview
HRI_BPL_FAST_FORMULA_UTIL is a utility package body in the APPS schema that provides a standardized interface for executing Oracle Fast Formulas (FF) programmatically from PL/SQL. Its primary business purpose is to abstract the mechanics of the FF_EXEC API — formula initialization, input parameter binding, execution, and output retrieval — so that higher-level business logic packages can invoke Fast Formulas without duplicating the boilerplate code required to manage FF_EXEC.INPUTS_T and FF_EXEC.OUTPUTS_T arrays. The package is classified as a UTIL object within the ETRM taxonomy, indicating that it is a shared, non-business-specific helper rather than a functional API in its own right. In the HRI (Human Resources Intelligence) product family, this utility is used when business processes must derive event details or computed values dynamically from a stored formula rather than from hard-coded logic. It is especially relevant in configurations where formula selection is data-driven, such as determining which balance group or setup formula applies to a given legislative context.
Key Procedures and Functions
The package exposes six documented procedures and functions. Only RUN_FORMULA has its full signature published in the source excerpt; the remaining five are documented by name in the ETRM metadata and are described here by purpose only.
- RUN_FORMULA — Executes a Fast Formula identified by a formula ID. It calls FF_EXEC.Init_Formula to initialize the formula and retrieve its input array, populates those inputs from a caller-supplied formula_param_type table (matching by upper-cased parameter name), invokes FF_EXEC.Run_Formula, and translates the resulting output array back into an output table. It is the core execution engine of the package.
- FETCH_BG_FORMULA_ID — Resolves the formula ID associated with a Balance Group. This is the procedure most relevant to the user's search term "fetch_bg_formula_id," and is typically used when payroll or benefits logic must determine which formula drives a balance group calculation.
- FETCH_SETUP_FORMULA_ID — Retrieves the formula ID for a configuration or setup-level formula, used when the applicable formula is determined by setup data rather than by a seeded or balance-group association.
- FETCH_SEEDED_FORMULA_ID — Returns the formula ID for a seeded (Oracle-delivered) formula, providing a deterministic way to locate the base formula shipped with the application.
- FETCH_FORMULA_ID — A general-purpose resolver that returns a formula ID based on the criteria supplied by the caller; it likely serves as the common lookup routine used by the more specific FETCH_* procedures.
Tables Accessed
The package reads from three documented tables, all via APPS synonyms:
- FF_FORMULAS_F — The Fast Formula definition table. It holds formula identifiers, names, and type associations, and is the source of the formula IDs returned by the FETCH_* procedures.
- FF_FORMULA_TYPES — Read by SET_FF_TYPE_ID, which selects FORMULA_TYPE_ID into the package global g_formula_type_id by matching FORMULA_TYPE_NAME. This global scopes subsequent formula lookups to a specific formula type.
- PLITBLM — A generic PL/SQL index-by table used as the storage type for the package's formula_param_type parameter structures, supporting the input/output mapping performed by RUN_FORMULA.
Usage Notes
HRI_BPL_FAST_FORMULA_UTIL is invoked from other packages rather than directly from end-user forms. The ETRM metadata records that it is referenced by two other packages, confirming its role as a shared dependency. Typical invocation patterns include: calling SET_FF_TYPE_ID once to establish the formula type context, then calling a FETCH_* procedure to obtain the correct formula ID, and finally passing that ID to RUN_FORMULA along with the required input values. Custom code extending Oracle HRMS or payroll functionality should likewise call these procedures rather than FF_EXEC directly, to preserve consistency with Oracle's error handling and parameter-name conventions. Because the source header dates to the 12.0.0 code line (120.1.12000000.2), the package is present and unchanged in both EBS 12.1.1 and 12.2.2. Developers integrating it should note that RUN_FORMULA depends on FF_EXEC being initialized and that input parameter names are matched case-insensitively after upper-casing.