Search Results delete_adjustment




Overview

The APPS.PAY_BALANCE_ADJUSTMENT_API package body provides the programmatic interface for creating and removing balance adjustments within Oracle Payroll. Balance adjustments represent corrective payroll entries applied against an assignment's balances outside the normal payroll run cycle, allowing payroll administrators to compensate for retroactive changes, overpayments, underpayments, or other circumstances requiring manual correction of accumulated payroll values. The package encapsulates the validation and data manipulation logic required to generate the payroll action, assignment action, element entry, and run result rows that the payroll engine requires in order to recognize and process the adjustment.

Because balance adjustments must respect element eligibility, consolidation set definitions, and effective dating rules, direct insertion into payroll tables is neither supported nor advisable. This API serves as the sanctioned entry point, ensuring that all dependent records are created consistently and that the adjustment is visible to subsequent payroll processing. The package header, identified by the version string pybadapi.pkb 120.0, is classified as an API in the ETRM repository and is referenced by three other packages, confirming its role as a shared utility within the payroll application tier.

Key Procedures and Functions

The package exposes two documented procedures:

  • CREATE_ADJUSTMENT — Performs a single balance adjustment. As stated in the package source comments, its purpose is to "perform a single balance adjustment." The procedure accepts a validation flag (p_validate) that permits callers to exercise all business rule checks in a rollback-only mode before committing data. Additional parameters supply the effective date of the adjustment, the target assignment, the consolidation set, the element link identifying the balance element to be adjusted, and up to several input value identifiers that qualify the adjustment amount and dimension. Element entry and run result records are generated as part of the processing.
  • DELETE_ADJUSTMENT — Removes a previously created balance adjustment, reversing the associated payroll action and supporting records so that the adjustment no longer affects balance calculations. This procedure supports correction of adjustments that were entered in error or that are no longer required.

Both procedures operate within the standard API conventions of Oracle Payroll, including the propagate-validation pattern and the assumption that the caller supplies a valid effective date within an open payroll period.

Tables Accessed

The package reads from and writes to the following tables, accessed through APPS synonyms:

  • PAY_PAYROLL_ACTIONS and PAY_PAYROLL_ACTIONS_S — the parent payroll action and its translated/secure view, used to register the adjustment action against the appropriate payroll and consolidation set.
  • PAY_ASSIGNMENT_ACTIONS — records the assignment-level action that links the adjustment to a specific employee assignment.
  • PAY_ELEMENT_ENTRIES_F — stores the element entry that carries the adjustment, including entry values derived from the supplied input value identifiers.
  • PAY_RUN_RESULTS — holds the calculated run result rows generated for the adjustment, which feed subsequent balance processing.
  • PER_TIME_PERIODS — provides the payroll period context used to validate the effective date and determine the correct period for the adjustment.
  • DUAL — used for singleton queries and default value resolution within the package body.

Usage Notes

This API is typically invoked from custom PL/SQL code, concurrent programs, or extensions to standard payroll forms where a balance correction must be applied programmatically. It is not intended for direct end-user data entry; standard Oracle Payroll forms such as the Balance Adjustment window call the same underlying logic. Callers should first invoke CREATE_ADJUSTMENT with p_validate set to TRUE to confirm that the element link, assignment, and effective date pass validation, then re-invoke with p_validate set to FALSE to commit. Because the procedure creates payroll actions and run results, the adjustment becomes subject to normal payroll processing and reversal rules; DELETE_ADJUSTMENT should be used to undo unwanted entries rather than direct deletion from the base tables. The package is available in both Oracle EBS 12.1.1 and 12.2.2, and the version header indicates it has remained stable across these releases.