Search Results efc_get_derived_factor
Overview
APPS.HR_CURRENCY_PKG is a currency conversion and exchange rate utility package in Oracle E-Business Suite, delivered under the Oracle HRMS (Payroll) schema. Its stated purpose is to provide a cover or wrapper layer over the GL_CURRENCY_API, isolating callers from the underlying General Ledger currency engine while exposing a simpler, HR-oriented interface. The package performs two primary business functions: it determines an exchange rate between any two currencies given a currency type and conversion date, and it converts an amount from one currency to another using the same inputs. Because payroll and HR calculations frequently require currency translation, the package is designed to be callable from both PL/SQL and Fast Formula contexts, providing validation functions that verify the existence of a conversion rate type before calculations proceed.
Key Procedures and Functions
The package exposes twelve documented procedures and functions. CHECK_RATE_TYPE validates that a specified conversion rate type exists in the GL_DAILY_CONVERSION_TYPES table, returning a value indicating success or error; it is intended for use inside Fast Formulas to validate a rate type. GET_RATE_TYPE retrieves the rate type based on supplied criteria. GET_RATE determines the exchange rate between two currencies for a currency type and conversion date, and GET_RATE_SQL provides a SQL-callable variant of the same logic. CONVERT_AMOUNT converts an amount from a source to a target currency, with CONVERT_AMOUNT_SQL supplying the corresponding SQL-callable form. IS_NCU_CURRENCY and IS_NCU_CURRENCY_SQL test whether a currency is a non-current or "NCU" currency. EFC_CONVERT_NUMBER_AMOUNT, EFC_GET_DERIVED_FACTOR, EFC_CONVERT_VARCHAR2_AMOUNT, and EFC_IS_NCU_CURRENCY are the EFC-prefixed variants used for Fast Formula (Payroll Formula) integration, supporting number and character amount conversions and derived factor retrieval. Together these functions cover rate derivation, amount conversion, rate type validation, and currency classification.
Tables Accessed
The package references several core currency tables through APPS synonyms. FND_CURRENCIES supplies the valid currency definitions used to identify source and target currencies. GL_DAILY_CONVERSION_TYPES holds the rate type definitions validated by CHECK_RATE_TYPE and used by the rate and conversion functions. GL_DAILY_RATES provides the actual daily exchange rate rows from which rates are derived and amounts converted. PAY_USER_COLUMN_INSTANCES_F is referenced in the HR/payroll context for user-defined column instance data, and DBMS_UTILITY is used for standard database utility operations such as error handling and formatting.
Usage Notes
HR_CURRENCY_PKG is documented as being referenced by twenty-four other packages, indicating it is a foundational utility within the HRMS currency processing chain. It is typically invoked from Fast Formulas through the EFC_ prefixed functions, which are tailored to the Payroll formula engine and its data types; the non-EFC procedures are invoked from custom PL/SQL, concurrent program logic, and other Oracle HRMS packages that require currency conversion. A key usage consideration concerns the NO_DERIVE_TYPE exception: it is raised when no derive type is found for a specified currency during the specified period, a condition commonly encountered when exchange rate derivation rules or the rate type configuration are incomplete. The INVALID_CURRENCY and NO_RATE exceptions similarly flag invalid currency codes or missing rate rows. Callers should anticipate these conditions and provide appropriate error handling. The package header dates to the 12.1.1 code line and remains valid through 12.2.2.