Search Results latest_balance_exists




Overview

APPS.PAY_PAYROLL_ACTIONS_PKG is a server-side PL/SQL package within the Oracle E-Business Suite Payroll module. It serves as the primary programmatic interface for maintaining and querying records in the PAY_PAYROLL_ACTIONS table, which stores the header-level definition of consolidated payroll runs. The package encapsulates row-level DML on the underlying base table and provides a set of view-support functions used by the Payroll Actions form (PAYWSACT). In addition, it implements a small generic binding mechanism for passing numeric, date, and character values into runtime views, a facility introduced under the header of Bug 643154 (source header pypra02t.pkh 120.0.12010000.1). The package is classified as OTHER in ETRM and is referenced by five other packages across the Payroll and related modules, confirming its role as a shared utility layer rather than a purely form-local API.

Key Procedures and Functions

The documented interface comprises 16 procedures and functions. The DML procedures operate on rows identified by ROWID:

  • UPDATE_ROW — updates a payroll action row, including its action status.
  • DELETE_ROW — deletes a payroll action row.
  • LOCK_ROW — acquires a row-level lock for optimistic concurrency control, typically on action status.
  • V_ACTION_STATUS — returns the displayable status for a payroll action; two overloads exist, the second accepting a force flag. This function supports the PAYWSACT view logic and is subject to a restrict_references pragma (WNPS, WNDS), marking it as callable from SQL.
  • V_MESSAGES_EXIST — indicates whether message lines exist for a payroll action; also declared with a restrict_references pragma.
  • V_NAME — constructs the descriptive name of a payroll action, derived from action type, consolidation set, run number, element set, assignment set, and effective date; two overloads exist with the second adding a force flag.
  • SET_QUERY_BINDVAR / GET_NUM_BINDVAR / GET_DATE_BINDVAR / GET_CHAR_BINDVAR / SET_WHERE — a documented mechanism that allows numeric, date, and character bind values to be passed through to a view. The source comment states that this mechanism is likely to be genericised into a common code area in a future release. Within this group, SET_WHERE is the function most frequently targeted by developer searches, reflecting its use in dynamically constraining the row set a view returns.
  • LATEST_BALANCE_EXISTS and DECODE_CHEQUE_TYPE — auxiliary functions supporting balance checks and cheque type decoding for payroll actions.

Tables Accessed

The package reads and writes the following objects through APPS synonyms. Principal is PAY_PAYROLL_ACTIONS, the base table manipulated by UPDATE_ROW, DELETE_ROW, and LOCK_ROW. Associated payroll action detail is held in PAY_ASSIGNMENT_ACTIONS and PAY_MESSAGE_LINES, the latter supporting V_MESSAGES_EXIST. Consolidation, element, and assignment set definitions are resolved via PAY_CONSOLIDATION_SETS, PAY_ELEMENT_SETS, PAY_ELEMENT_SETS_TL, HR_ASSIGNMENT_SETS, HR_ALL_ORGANIZATION_UNITS, and PAY_ELEMENT_TYPES_F / PAY_ELEMENT_TYPES_F_TL, all required by the V_NAME derivation logic. Balance-related functions reference PAY_LATEST_BALANCES and PAY_ASSIGNMENT_LATEST_BALANCES. Concurrent request context is obtained from FND_CONCURRENT_REQUESTS (used by V_ACTION_STATUS), while PAY_BATCH_HEADERS and PAY_LEGISLATIVE_FIELD_INFO supply batch and legislative context.

Usage Notes

PAY_PAYROLL_ACTIONS_PKG is invoked primarily from the Payroll Actions form (PAYWSACT), where its view functions supply derived display columns and its locking and DML procedures maintain the rows edited by the user. Concurrent programs that create or modify payroll action records may call the update and delete procedures directly, and the package is referenced by five other packages, indicating reuse in shared Payroll processing code. Custom code should treat the documented signatures as the supported contract and avoid bypassing LOCK_ROW when updating status. The bind-variable group, including SET_WHERE, is an internal convenience layer tied to form view queries; Oracle's own source comment flags it as a candidate for future genericisation, so customizations depending on it should be reviewed carefully during upgrades.