Search Results chk_delete_defined_balance




Overview

PAY_DEFINED_BALANCES_PKG is an Oracle Payroll package in the APPS schema that supports the maintenance and validation of defined balances within Oracle EBS 12.1.1 and 12.2.2. Defined balances are the configurable payroll accumulators that aggregate earnings, deductions, and other balance dimensions across payroll runs; they underpin statutory reporting, garnishments, costing, and downstream analytics. Because defined balances are stored as effective-dated rows within the balance definition model, the package encapsulates the referential, validation logic, and defaults management that must occur whenever a defined balance or its associated attributes are created, modified, or removed. The package header declares AUTHID CURRENT_USER, meaning it executes with the privileges of the calling schema rather than the definer.

Key Procedures and Functions

  • CHK_DELETE_DEFINED_BALANCE — validates whether it is permissible to remove a given defined balance, guarding against orphaned or dependent records.
  • SET_SAVE_RUN_BALS_FLAG — a function returning VARCHAR2 that determines the value of save_run_balance on PAY_DEFINED_BALANCES, derived from the save_run_balance_enabled settings on the balance category and balance dimension.
  • INSERT_DEFAULT_ATTRIB_WRAPPER — a wrapper procedure that invokes INSERT_DEFAULT_ATTRIBUTES when the call originates from server-side code rather than from a form.
  • INSERT_DEFAULT_ATTRIBUTES — the core procedure for creating default balance attributes; called directly from forms or indirectly via the wrapper. This is the procedure associated with the search term "insert_default_attributes."
  • INSERT_ROW — inserts a new defined balance row.
  • LOCK_ROW — acquires a lock on a defined balance row for update.
  • UPDATE_ROW — updates an existing defined balance row.
  • DELETE_ROW — removes a defined balance row, typically following CHK_DELETE_DEFINED_BALANCE validation.
  • VERIFY_SAVE_RUN_BAL_FLAG_UPD — verifies the save run balance flag during updates.

Tables Accessed

The package touches a range of core payroll configuration and balance tables through APPS synonyms. PAY_DEFINED_BALANCES, PAY_DEFINED_BALANCES_S, PAY_BALANCE_ATTRIBUTES, PAY_BAL_ATTRIBUTE_DEFINITIONS, and PAY_BAL_ATTRIBUTE_DEFAULTS hold the defined balance and attribute definitions and defaults that the package inserts, updates, and deletes. PAY_BALANCE_CATEGORIES_F and PAY_BALANCE_DIMENSIONS provide the effective-dated category and dimension settings used by SET_SAVE_RUN_BALS_FLAG. PAY_BALANCE_TYPES and PAY_BALANCE_VALIDATION supply validation context. Reference and supporting data is drawn from PAY_BACKPAY_RULES, PAY_ORG_PAYMENT_METHODS_F, FND_SESSIONS, PAY_ASSIGNMENT_LATEST_BALANCES, PAY_PERSON_LATEST_BALANCES, and PAY_RUN_BALANCES.

Usage Notes

PAY_DEFINED_BALANCES_PKG is typically invoked from the Payroll defined-balance configuration forms, from server-side payroll processes, and from custom extensions. When triggered from a form, INSERT_DEFAULT_ATTRIBUTES is called directly; when triggered from server-side code, INSERT_DEFAULT_ATTRIB_WRAPPER is used instead, preserving the same behaviour while normalising the calling context. The package is referenced by twelve other packages, reflecting its central role in the balance definition lifecycle. Only the documented signatures should be relied upon, as the underlying implementation is versioned by the packaged header.