Search Results pay_mx_dim_mag




Overview

PAY_MX_DIM_MAG is an Oracle E-Business Suite PL/SQL package body owned by the APPS schema that supports the Mexican statutory payroll reporting process known as DIM (Declaración Informativa de Sueldos y Salarios, or the "mag" magnetic media extract). Mexican tax legislation requires employers to report salary and withholding information to the tax authority (SAT) in a prescribed electronic format, and this package provides the programmatic engine that constructs that file from Oracle Payroll data. It is part of the broader Oracle Payroll localization for Mexico and works alongside companion packages such as PAY_MX_UTILITY, PAY_MAGTAPE_GENERIC, and PAY_MX_ISR_TAX_FORMAT37_V.

The package status is documented as VALID, and its API classification is recorded as OTHER. It is not referenced by any other database object, indicating it serves as a top-level, self-contained generator rather than a reusable library component.

Key Procedures and Functions

ETRM documents five procedures within this package body:

  • RANGE_CURSOR — A cursor-driven procedure that iterates over the population ranges defined for the payroll run, providing the row-by-row driving logic for the extract. It reads from PAY_POPULATION_RANGES to determine the assignment scope for reporting.
  • ACTION_CREATION — Creates the payroll action records required to drive and log the DIM extract, interfacing with PAY_ASSIGNMENT_ACTIONS, PAY_ASSIGNMENT_ACTIONS_S, PAY_PAYROLL_ACTIONS, and PAY_ACTION_INTERLOCKS.
  • GENERATE_XML_HEADER — Emits the opening section of the XML output, including file-level identifiers, period data, and employer information required by the SAT schema.
  • GENERATE_XML — The main body generator that produces the per-employee and per-concept detail records for the DIM file, applying the Mexican salary and tax rules.
  • GENERATE_XML_FOOTER — Writes the closing control totals and trailer section that validates the extract against expected record counts.

The separation of header, body, and footer generation allows the XML to be streamed incrementally via DBMS_LOB, which is important for large payroll populations.

Tables Accessed

  • PAY_ASSIGNMENT_ACTIONS / PAY_ASSIGNMENT_ACTIONS_S — Source of processed assignment-level action results used as the primary payroll data feed.
  • PAY_PAYROLL_ACTIONS — Provides the parent payroll action context (run, period, consolidation set) for the extract.
  • PAY_ACTION_INTERLOCKS — Enforces action-level locking and sequencing so the extract does not collide with concurrent payroll processing.
  • PAY_POPULATION_RANGES — Defines the chunking strategy that RANGE_CURSOR iterates over.
  • DBMS_LOB and PLITBLM — Used for large-object handling and index-by-table manipulation during XML assembly.
  • DUAL — Standard single-row utility reference.

Usage Notes

PAY_MX_DIM_MAG is typically invoked by the Mexican Payroll statutory reporting concurrent program, which submits the DIM extract and produces the output file stored via the standard Payroll archive (PAY_CORE_FILES). It relies on FND_GLOBAL for session context, FND_DATE and FND_NUMBER for locale-safe formatting, and HR_UTILITY and HR_NONRUN_ASACT for HR lookup support. Because the package manipulates payroll actions directly, it should only be run through the supported concurrent program and not called from ad hoc SQL. Customizations should extend, not bypass, the action interlock logic to avoid corrupting payroll action state.