Search Results set_paramter_value
Overview
PAY_MAGTAPE_GENERIC is a PL/SQL package owned by APPS that underpins the Oracle Payroll Magnetic Tape process in Oracle E-Business Suite 12.1.1 and 12.2.2. The package builds the runtime framework used to generate magnetic tape files (and, in later releases, XML-based magtape output) from the block and record definitions maintained in the PAY_MAGNETIC_BLOCKS and PAY_MAGNETIC_RECORDS tables. Rather than hard-coding tape layouts, the package reads configuration metadata and dynamically constructs the parameter and context tables that the Magnetic Tape concurrent process consumes, allowing payroll localization teams to define country-specific tape formats declaratively.
The package header (pymaggen.pkh) carries a long modification history spanning 1995 to 2006, covering error handling, multithreaded magtape execution, GSCC compliance fixes, XML output support, and a procedure to set parameter values in FF_ARCHIVE_ITEMS. The ETRM metadata classifies it as OTHER and records seven documented program units. It is widely referenced across the application: 158 other packages depend on it, which reflects its role as a shared low-level utility for payroll tape generation.
Key Procedures and Functions
- DATE_EARNED — Returns a date used by global cursors defined in the reporting layer (historically pyusmrep). It is declared with a restrict_references pragma (WNDS, WNPS), meaning it does not write database state or package state.
- NEW_FORMULA — Documented procedure associated with formula processing during magtape generation. This is the object most directly matching the user search term "new_formula"; it participates in resolving or preparing formula-related values used when constructing tape records.
- GET_PARAMETER_VALUE — Retrieves the value of a named tape parameter, returning it as a VARCHAR2. Used by the magtape engine to resolve parameter placeholders at runtime.
- GET_CURSOR_RETURN — Returns a VARCHAR value at a given positional index from the results of a named cursor defined in PAY_MAGNETIC_BLOCKS. This enables dynamic cursor output to be mapped into tape record positions.
- CLEAR_CACHE — Flushes the package-level cache, including the internal char_array and boolean flag state used to hold tag and cursor data between calls.
- CLEAR_CURSORS — Added in 2006, this procedure resets cursor state so repeated or multithreaded magtape runs do not carry stale cursor data between executions.
- SET_PARAMTER_VALUE — Sets a parameter value into FF_ARCHIVE_ITEMS (note the misspelling in the stored name; this is the actual documented identifier). Added in 2005 to support archive item parameter persistence.
Tables Accessed
- PAY_MAGNETIC_BLOCKS — Defines the blocks and named cursors that structure each magnetic tape format; read to build parameter and context tables and to drive GET_CURSOR_RETURN.
- PAY_MAGNETIC_RECORDS — Defines the individual record layout entries within each block; read to map cursor output into tape positions.
- FF_ARCHIVE_ITEMS / FF_ARCHIVE_ITEMS_S — Formula function archive tables; written by SET_PARAMTER_VALUE to persist parameter values used during archive item processing.
- PER_ALL_ASSIGNMENTS_F — Assignment-level data; accessed to derive dates and payroll context used by DATE_EARNED and tape record generation.
- DBMS_SQL — Oracle-supplied dynamic SQL package used to open and fetch the dynamically defined cursors referenced by name in the magnetic block definitions.
Usage Notes
PAY_MAGTAPE_GENERIC is not intended for direct end-user invocation. It is called by the Oracle Payroll Magnetic Tape concurrent program and, given 158 dependent packages, by a broad set of payroll report and localization packages across 12.1.1 and 12.2.2. Custom localization work typically extends magtape behavior by populating PAY_MAGNETIC_BLOCKS and PAY_MAGNETIC_RECORDS rather than modifying this package. When custom code does call it, CLEAR_CACHE and CLEAR_CURSORS should be invoked at the start and end of a run to avoid stale state, particularly in multithreaded execution. Because the package header was last modified in 2008 and remains at version 120.2.12010000.1, it is a legacy artifact that should be treated as effectively static; any custom dependency on its internal cursor or cache behavior should be reviewed before upgrades, since the package is shared so broadly across the payroll schema.