Search Results get_prev_sal_change_date
Overview
PAY_ADHOC_UTILS_PKG is a shared PL/SQL utility package owned by the APPS schema in Oracle E-Business Suite, classified under the API taxonomy as OTHER. It is declared with AUTHID CURRENT_USER, meaning that all SQL statements execute with the privileges of the invoking schema rather than the package owner, which allows it to be reused by any module that has been granted EXECUTE on the package and holds the necessary object privileges on the underlying PAY and HR synonyms. The package does not implement a single business transaction; instead it provides a library of low-level helper routines that decode surrogate identifiers into meaningful values, resolve flexfield combinations, evaluate assignment set membership, and validate balance and element link data. Because the routines are narrowly scoped and stateless at the session level apart from the package globals, they are heavily reused across payroll and compensation development, both in Oracle-delivered code and in customer extensions. The ETRM metadata records 16 documented procedures and functions and 12 dependent packages, confirming its role as a foundational rather than a functional unit.
Key Procedures and Functions
- DECODE_CURRENCY_CODE — the routine associated with the search term. It accepts a currency code and returns a decoded textual representation, allowing callers to present a descriptive currency value rather than the raw code stored in transactional tables.
- DECODE_OPM_TERRITORY — resolves a territory code together with a business group identifier into a readable territory description.
- DECODE_EVENT_GROUP — translates an event group identifier into its descriptive name for display or reporting.
- DECODE_ELEMENT_TYPE — returns the element type name for a supplied element type identifier, evaluated as of an effective date so that date-tracked element definitions resolve correctly.
- GET_BANK_DETAILS — returns formatted bank account details for an external account identifier, typically for payment or third-party payment display.
- GET_ELEMENT_LINK_STATUS — derives the status of an element link by comparing link and effective start and end dates, returning a descriptive status string rather than raw dates.
- FLEX_CONCATENATED — builds a concatenated key or descriptive flexfield value from an application short name, flexfield name, structure/context, column list, column count, and up to three supplied segment values.
- GET_PREV_SALARY and GET_PREV_SAL_CHANGE_DATE — return the previous salary amount and the effective date of the prior salary change for an assignment.
- GET_MULTIPLE_SAL_CHANGE_FLAG — indicates whether more than one salary change exists, useful for guards in salary processing.
- GET_INPUT_NAME — resolves an input value name from the package-level input name/value collection populated during processing.
- CHECK_ASSIGNMENT_IN_SET — determines whether a given assignment belongs to a specified assignment set.
- CHECK_BALANCE_EXISTS — confirms whether a named balance and attribute combination exists.
- GET_BAL_VALID_LOAD_DATE — returns the valid load date for a balance using the package globals g_balance_name, g_attribute_name, and g_balance_load_date.
- CHK_POST_R11I — checks whether the installation has been upgraded beyond release 11i, supporting conditional logic across release levels.
- GET_ELEMENT_NAME — resolves an element name from its identifier.
The package also declares the record type r_record and the collection type v_input_name_value_tab, indexed by BINARY_INTEGER, which caches input name, input value, element name, classification, and recurring attributes for the duration of a session.
Tables Accessed
The package reads reference and definition data through APPS synonyms. PAY_ELEMENT_TYPES_F, PAY_ELEMENT_CLASSIFICATIONS, and PAY_INPUT_VALUES_F supply element and input definitions used by the decode, name resolution, and link status routines. PAY_BALANCE_TYPES, PAY_BALANCE_ATTRIBUTES, PAY_BALANCE_DIMENSIONS, PAY_BALANCE_VALIDATION, PAY_BAL_ATTRIBUTE_DEFINITIONS, and PAY_DEFINED_BALANCES support balance existence checks and load date resolution. HR_ASSIGNMENT_SETS and HR_ASSIGNMENT_SET_AMENDMENTS back the assignment set membership check, while FND_APPLICATION, FND_ID_FLEX_SEGMENTS, FND_LOOKUP_VALUES, and FND_PRODUCT_INSTALLATIONS provide flexfield metadata, lookup decoding, application identification, and installation status used by FLEX_CONCATENATED and CHK_POST_R11I.
Usage Notes
PAY_ADHOC_UTILS_PKG is an ad hoc utility package rather than a public API with a formal interface contract, and Oracle does not publish a compatibility guarantee for its signatures. It is invoked from payroll forms, concurrent program logic, and custom PL/SQL extensions that require decoding of payroll identifiers or flexfield concatenation without reimplementing the lookup logic. Because it runs under AUTHID CURRENT_USER, the invoking schema must have direct privileges on the referenced PAY, HR, and FND objects; grants that succeed for one schema may therefore fail for another. The package globals, including g_input_name_value_tab, g_element_entry_id, and the effective date variables, persist for the duration of a database session, so callers should initialize them before use and avoid relying on residual values. Custom code should treat the package as version-sensitive and prefer documented public APIs where an equivalent exists.