Search Results p_payroll_action_id




Overview

The APPS.PAY_MX_YEAREND_REP package body implements year-end statutory reporting logic for Mexican payroll processing within Oracle E-Business Suite. Its principal responsibility is to assemble the archived balance figures required to produce Mexican year-end reports such as the annual earnings statement (constancia de percepciones) and the annual tax summary submitted to the tax authority. The package operates on payroll data that has already been processed and archived, meaning it does not calculate live balances; instead it retrieves previously stored balance values from the payroll archive tables and reformats them for reporting output.

The package header carries the version identifier paymxyearend.pkb 120.20, dated 2012/03/01, which places it in the 12.1.1 and 12.2.2 code lines. The PAY_MX_ prefix confirms that the object is part of the Mexican localization layer of Oracle Payroll rather than the global payroll engine. The body declares a package-level cache record (g_format37_cache) keyed by payroll action, person, effective date, and balance name, together with PL/SQL index-by tables for numbers, VARCHAR2(80) values, and dates. This cache indicates that the package is designed for repeated access to the same set of year-end balances across many employees within a single payroll action, avoiding redundant archive queries.

Key Procedures and Functions

The documented interface exposes two functions.

  • GET_YE_ARCH_BAL_AMT — Returns the year-end archived balance amount for a given payroll action, person, effective date, and balance name. Internally it aggregates values from the archived action information joined to the archive item and context tables, converting stored character values to numbers through fnd_number.canonical_to_number and rounding the result. The routine emits HR tracing messages, which makes it diagnosable during concurrent request execution.
  • GET_F37_BALANCE — Returns a balance value in the format required by the Mexican year-end reporting layout (commonly referred to by its form or format designation). It draws on the same cached structures and balance definitions to produce the presentation-ready amount.

Both functions are read-only with respect to payroll data and are intended to be called from report generation logic rather than from transactional payroll runs.

Tables Accessed

The package reads from archive and balance-definition tables. FF_ARCHIVE_ITEMS, FF_ARCHIVE_ITEM_CONTEXTS, FF_CONTEXTS, and FF_USER_ENTITIES supply the archived year-end values and their context descriptors. PAY_ACTION_INFORMATION and PAY_ASSIGNMENT_ACTIONS link those archived values back to the assignment action and person identifiers, while PAY_PAYROLL_ACTIONS identifies the governing payroll action. Balance metadata is obtained from PAY_DEFINED_BALANCES, PAY_BALANCE_ATTRIBUTES, PAY_BALANCE_DIMENSIONS, and PAY_BAL_ATTRIBUTE_DEFINITIONS. FND_LOOKUP_VALUES provides lookup-driven configuration, and PER_GEN_HIERARCHY_NODES with PER_GEN_HIERARCHY_VERSIONS resolve organizational hierarchy relationships used when aggregating or grouping report output.

Usage Notes

PAY_MX_YEAREND_REP is invoked indirectly through the Mexican year-end reporting concurrent programs and their supporting report logic rather than being called interactively from a form. The p_payroll_action_id parameter surfaced in the search corresponds to the archive payroll action selected on the concurrent program submission form; that identifier scopes all subsequent archive queries to a single completed payroll run. Because the package reads exclusively from archive structures, the source payroll action must have been run with archive enabled and the year-end balances must already be written to the archive before the report is submitted. One dependent package references this body. Customizations should avoid modifying the package directly; instead, use the documented function signatures when extending year-end report output.