Search Results g_control_count




Overview

PAYPLNK is the PL/SQL package body behind the Oracle Payroll batch element entry upload facility in Oracle E-Business Suite 12.1.1 and 12.2.2. Its business purpose is to load, validate, and process payroll batch element entries — the mechanism by which payroll administrators, interfaces, and third-party systems introduce large volumes of element entries into a batch for a payroll run without entering each entry through the element entry form. The package orchestrates the entire batch lifecycle: it reads the header, control totals, and line records, validates each line against payroll element and input value definitions, applies the resulting statuses to headers, controls, and lines, and finally processes or purges the batch.

The package maintains substantial package-level global state, including the error flags g_header_error, g_control_error, and g_line_error, the processing mode indicator g_process_mode, and the counters g_count and g_control_count. The variable g_control_count, which the user searched for, is a number initialized to zero and is paired with the control-level collection types g_ctl_id_tbl, g_ctl_stat_tbl, and g_ctl_mess_tbl (all based on hr_entry or local table types). It tracks control total records accumulated during batch processing and works alongside the line-level equivalents g_line_id_tbl, g_status_tbl, and g_message_tbl.

Key Procedures and Functions

  • RUN_PROCESS — Primary driver that executes the batch processing cycle, coordinating header, control, and line handling and invoking validation and status update routines.
  • VALIDATE — Performs header- and control-level validation of the batch, setting the header and control error flags when discrepancies are found.
  • VALIDATE_LINES — Validates individual batch lines against element, input value, and assignment data, populating line status and message collections.
  • SET_STATUS — Updates the overall batch status on the batch header record.
  • SET_LINE_STATUS — Applies the computed status to individual lines in PAY_BATCH_LINES.
  • SET_HEADER_STATUS — Sets header-level status, typically reflecting the aggregate outcome of line and control validation.
  • PURGE — Removes processed batch data, supporting housekeeping of completed or rejected batches.

Tables Accessed

The package operates on the core batch entry tables: PAY_BATCH_HEADERS (batch-level status and control), PAY_BATCH_LINES (individual element entry lines), and PAY_BATCH_CONTROL_TOTALS (control total reconciliation). Validation logic joins to PAY_ELEMENT_TYPES_F, PAY_ELEMENT_ENTRIES_F, PAY_ELEMENT_LINKS_F, PAY_ELEMENT_CLASSIFICATIONS, PAY_INPUT_VALUES_F, and BEN_BENEFIT_CLASSIFICATIONS to confirm that elements and input values are valid for the assignment. Assignment-level context is drawn from PER_ABSENCE_ATTENDANCES and PER_ABSENCE_ATTENDANCE_TYPES where absence entries are involved. PAY_MESSAGE_LINES and PAY_MESSAGE_LINES_S store the diagnostic messages produced during validation, while PAY_UPGRADE_STATUS and FND_SESSIONS support upgrade tracking and session context.

Usage Notes

PAYPLNK is invoked primarily from the Batch Element Entry (BEE) functionality and related concurrent programs that load, validate, and process batch element entries. Custom interfaces that populate PAY_BATCH_HEADERS, PAY_BATCH_LINES, and PAY_BATCH_CONTROL_TOTALS typically call the validation and processing entry points after loading data. Because the package is documented as referenced by eight other packages, changes to its signature or global state can propagate widely; customizations should avoid direct manipulation of g_control_count and the associated collection globals, relying instead on the public procedures. The package is classified as OTHER, not a public API.