Search Results pay_ca_rl2_can_mag




Overview

PAY_CA_RL2_CAN_MAG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports Canadian legislative year-end reporting. Its specific purpose, as stated in the package header, is to support the generation of RL2 magnetic tape cancellation records required by Canada Revenue Agency (CRA) and Revenu Québec (RQ) legislative requirements. The package name reflects this scope: PAY (Payroll), CA (Canadian), RL2 (the RL-2 year-end slip format used in Québec), and MAG (magnetic media output).

The package is part of the Canadian Payroll year-end processing framework. When an employer must submit RL-2 information electronically, Oracle Payroll produces a formatted output file using the record layouts encoded in this package. Its procedures assemble the transmitter, employer, and employee record segments that comprise the RL2 file, including cancellation output when amendments or reversals are required. The package is declared AUTHID CURRENT_USER, meaning it executes with the privileges of the calling user rather than the definer, which affects how EXECUTE grants must be managed.

Key Procedures and Functions

The thirteen documented units fall into three functional groups:

The package header declares several cursors, including MAG_RL2_TRANSMITTER, MAG_RL2_EMPLOYER, and MAG_RL2_EMPLOYEE, which drive the selection of payroll action, assignment action, and person/assignment rows for the output. Cursor logic distinguishes transmitter and employer actions using parameter markers such as PAYROLL_ACTION_ID=P and PAYROLL_ACTION_ID=C. Notably, the commented-out variant of MAG_RL2_TRANSMITTER shows intent to include linked correction actions (report types RL2 and CAEOY_RL2_AMEND_PP with action status 'C'); the active code restricts selection to the single payroll action identified by the PAY_ACT parameter.

Tables Accessed

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

Usage Notes

PAY_CA_RL2_CAN_MAG is not intended for direct invocation by end users. It is called from the Canadian Payroll year-end concurrent programs that produce RL2 magnetic media output—typically the Magnetic Media (RL-2) submission process—and from the corresponding XML record generators. It may also be referenced by the CAEOY_RL2_AMEND_PP amendment process, as evidenced by the interlocks logic in the transmitter cursor. Developers extending Canadian year-end output should treat the record-assembly routines as the extension point for layout changes, and the validation routines (VALIDATE_QUEBEC_NUMBER, CONVERT_SPECIAL_CHAR) as reusable utilities for Québec-specific data hygiene. No other packages in the documented set reference this package, so its API surface is stable and confined to the year-end reporting framework.