Search Results leg_code
Overview
PAY_MAG_TAPE is a PL/SQL package body in the Oracle E-Business Suite Payroll (PAY) module that supports the generation and processing of magnetic media tape files for statutory and third-party payroll reporting. Its principal role is to construct and execute dynamically generated PL/SQL statements that drive the extraction and formatting of payroll data into file-based output, and to coordinate the creation of XML-structured magnetic media files through the PAY_CORE_FILES file management API. The package acts as a runtime engine that bridges generic magnetic tape configuration stored in payroll setup tables with the specific procedural logic required to render the final file. This design allows legally mandated reporting formats to be configured as data rather than hard-coded logic.
Key Procedures and Functions
The package exposes three documented procedures:
- RUN_PROC — Accepts a command string and constructs a complete anonymous PL/SQL block from it (
BEGIN <command>; END;). The procedure opens a DBMS_SQL cursor, parses the statement using the DBMS_SQL.V7 dialect, executes it, and closes the cursor. It includes a NO_DATA_FOUND exception handler that ensures the cursor is closed before re-raising the error. This is the general-purpose dynamic execution routine used for non-XML magnetic tape processing. - RUN_XML_PROC — Extends dynamic execution to XML output. Before running the supplied command, it opens a file through PAY_CORE_FILES.OPEN_FILE, registering the source, file location, XML file type, internal name 'MAGFILE', and sequence, and capturing the resulting file identifier in the package global G_BLOB_FILE_ID. It then reads the corresponding BLOB_FILE_FRAGMENT from PAY_FILE_DETAILS into G_BLOB_VALUE, executes the supplied command dynamically, and finally calls PAY_CORE_FILES.CLOSE_FILE to finalize the XML file.
- CALL_LEG_XML_PROC — The legislation-aware driver procedure. It declares local variables for the payroll action identifier, sequence, magnetic block, legislation code, report group, and procedure name. It retrieves the transfer payroll action identifier via PAY_MAGTAPE_GENERIC.GET_PARAMETER_VALUE and uses this to determine the payroll action, report group, record identifier, and legislation code needed to invoke the correct legislation-specific XML procedure. This procedure is the primary point at which legislation-specific magnetic tape logic is dispatched.
Tables Accessed
The package references the following objects through APPS synonyms:
- PAY_PAYROLL_ACTIONS — Provides the payroll action context, including the transfer payroll action used to resolve the correct reporting run.
- PAY_TEMP_OBJECT_ACTIONS — Holds temporary object action data used during magnetic tape generation to track processing state.
- PAY_FILE_DETAILS — Stores BLOB segments for generated files; queried for BLOB_FILE_FRAGMENT to populate the global BLOB value used in XML output.
- PAY_REPORT_GROUPS — Defines the report group configuration that determines which reports and formats apply to a given legislative run.
- PAY_REPORT_MAGNETIC_PROCEDURES — The configuration table that maps legislation and magnetic tape formats to the specific PL/SQL procedure names invoked dynamically at runtime.
- DBMS_SQL — The Oracle-supplied dynamic SQL package used to parse and execute the generated command strings.
Usage Notes
PAY_MAG_TAPE is not intended to be called directly by end users. It is invoked through the Oracle Payroll magnetic media concurrent programs, which resolve the appropriate legislative procedure from PAY_REPORT_MAGNETIC_PROCEDURES and pass control through CALL_LEG_XML_PROC. The package is referenced by 23 other packages within the E-Business Suite, indicating it is a foundational component of the magnetic tape generation framework across multiple legislations. Developers extending or troubleshooting magnetic media output should inspect the configured procedure name in PAY_REPORT_MAGNETIC_PROCEDURES for the relevant legislation code, since the actual file formatting logic resides in the legislation-specific package called by CALL_LEG_XML_PROC rather than in PAY_MAG_TAPE itself. The package is version 120.8.12010000.1 (2008) and is present in both Oracle EBS 12.1.1 and 12.2.2 releases.
-
APPS.PAY_MAG_TAPE SQL Statements
12.2.2
-
APPS.PAY_MAG_TAPE SQL Statements
12.1.1
-
PACKAGE BODY: APPS.PAY_MAG_TAPE
12.1.1
-
PACKAGE BODY: APPS.PAY_MAG_TAPE
12.2.2
-
PACKAGE BODY: APPS.HR_NL_EXTRA_PERSON_RULES
12.1.1
-
PACKAGE BODY: APPS.HR_NL_EXTRA_PERSON_RULES
12.2.2
-
VIEW: APPS.PER_PEOPLE_V2
12.2.2
-
PACKAGE BODY: APPS.HR_NZ_ASSIGNMENT_LEG_HOOK
12.1.1
-
PACKAGE BODY: APPS.HR_NZ_ASSIGNMENT_LEG_HOOK
12.2.2
-
APPS.HR_PAYMENTS SQL Statements
12.1.1
-
APPS.HR_PAYMENTS SQL Statements
12.2.2
-
APPS.FFDICT SQL Statements
12.2.2
-
APPS.FFDICT SQL Statements
12.1.1
-
PACKAGE: APPS.HR_PAYMENTS
12.1.1
-
PACKAGE: APPS.HR_PAYMENTS
12.2.2
-
PACKAGE BODY: APPS.HR_NO_QUALIFICATION_TYPE_API
12.1.1
-
PACKAGE BODY: APPS.HR_NO_QUALIFICATION_TYPE_API
12.2.2
-
PACKAGE BODY: APPS.HR_FI_CONTACT_API
12.1.1
-
PACKAGE BODY: APPS.HR_FI_CONTACT_API
12.2.2
-
PACKAGE: APPS.HR_LOOKUPS_UTIL_PKG
12.2.2
-
PACKAGE: APPS.HR_LOOKUPS_UTIL_PKG
12.1.1
-
PACKAGE BODY: APPS.HR_FI_PREVIOUS_EMPLOYMENT_API
12.2.2
-
PACKAGE BODY: APPS.HR_FI_PREVIOUS_EMPLOYMENT_API
12.1.1
-
PACKAGE BODY: APPS.PAY_SIMULATOR_SS_PKG
12.2.2
-
PACKAGE BODY: APPS.PAY_GB_AEI_API
12.2.2
-
PACKAGE BODY: APPS.HR_FI_APPLICANT_API
12.2.2
-
PACKAGE BODY: APPS.HR_FI_CONTINGENT_WORKER_API
12.1.1
-
PACKAGE BODY: APPS.HR_FI_CONTINGENT_WORKER_API
12.2.2
-
PACKAGE BODY: APPS.HR_FI_APPLICANT_API
12.1.1
-
PACKAGE BODY: APPS.HR_SA_PERIODS_OF_SERVICE_API
12.2.2
-
PACKAGE BODY: APPS.HR_SA_PERIODS_OF_SERVICE_API
12.1.1
-
PACKAGE BODY: APPS.HR_KW_PREVIOUS_EMPLOYMENT_API
12.1.1
-
PACKAGE BODY: APPS.HR_NO_JOB_API
12.1.1
-
PACKAGE BODY: APPS.HR_AE_CONTRACT_API
12.1.1
-
PACKAGE BODY: APPS.HR_NO_QUALIFICATION_API
12.1.1
-
PACKAGE BODY: APPS.HR_SA_PREVIOUS_EMPLOYMENT_API
12.1.1
-
PACKAGE BODY: APPS.HR_KW_CONTRACT_API
12.1.1
-
PACKAGE BODY: APPS.HR_NO_JOB_API
12.2.2
-
PACKAGE BODY: APPS.HR_FI_EMPLOYEE_API
12.2.2
-
PACKAGE BODY: APPS.HR_SA_CONTRACT_API
12.1.1
-
PACKAGE BODY: APPS.HR_FR_JOB_API
12.2.2
-
PACKAGE BODY: APPS.HR_KW_CONTRACT_API
12.2.2
-
PACKAGE BODY: APPS.HR_NO_CONTRACT_API
12.1.1
-
PACKAGE BODY: APPS.HR_SA_CONTRACT_API
12.2.2
-
PACKAGE BODY: APPS.HR_FI_QUALIFICATION_API
12.2.2
-
PACKAGE BODY: APPS.PQP_PL_VEHICLE_ALLOCATIONS_API
12.1.1
-
PACKAGE BODY: APPS.HR_NO_CONTRACT_API
12.2.2
-
PACKAGE BODY: APPS.HR_AE_CONTRACT_API
12.2.2
-
PACKAGE BODY: APPS.HR_NO_QUALIFICATION_API
12.2.2
-
PACKAGE BODY: APPS.HR_BE_CONTRACT_API
12.1.1