Search Results pay_jp_magtape_pkg




Overview

APPS.PAY_JP_MAGTAPE_PKG is a Japanese localized payroll package body responsible for generating and formatting magnetic tape (MT) files used for bank transfers of payroll payments in Oracle E-Business Suite releases 12.1.1 and 12.2.2. In the Oracle Payroll architecture, the Japanese localization requires output of employee net pay to financial institutions in a strictly defined fixed-format magnetic media layout, and this package serves as the orchestration layer that constructs header, data, trailer, and end records for those files. The package is classified as OTHER in the ETRM registry rather than as a public API, reflecting its internal role. Its documented header comment ($Header: payjpmag.pkb 120.0) confirms it forms part of the seeded Japanese payroll (PAYJPMAG) delivery. The package maintains package-level global variables (g_character_set, g_header_sql, g_data_sql, g_trailer_sql, g_end_sql) which dynamically hold SQL statement text assembled during initialization, and it references a default format package, pay_jp_magtape_format_pkg, by name through the constant c_default_package_name. This design allows different bank or clearing-house tape formats to be substituted at runtime without modifying the driver package itself.

Key Procedures and Functions

  • LATEST_REQUEST_ID — Returns the most recent concurrent request ID associated with a given payroll action ID. It queries FND_CONCURRENT_REQUESTS joined to FND_CONCURRENT_PROGRAMS for application 801 and program short name PAYJPMAG, matching fcr.argument1 to the payroll action ID. The MAX aggregate is deliberately used so that the cursor never raises NO_DATA_FOUND.
  • SHOW_SQL — A debug utility that accepts a record-type indicator and returns the corresponding dynamically built SQL string (header, data, trailer, or end). It exposes the internally generated SQL for diagnostic purposes.
  • INIT — Initialization routine that sets up the package globals, presumably resolving the character set and assembling the header, data, trailer, and end SQL statements prior to record generation.
  • HEADER_RECORD — Produces the header record of the magnetic tape file, typically containing bank, payroll, and processing metadata.
  • DATA_RECORD — Produces the detail payment records for each employee, drawing on employee, payroll, and bank account information.
  • TRAILER_RECORD — Produces the trailer record, generally carrying totals and counts of detail records.
  • END_RECORD — Produces the end-of-file record that closes the magnetic tape structure.

Tables Accessed

The package reads configuration and transaction data through documented APPS synonyms. PAY_PAYROLL_ACTIONS anchors the run context (supplying p_payroll_action_id). PER_ALL_PEOPLE_F provides employee identity data. PAY_EXTERNAL_ACCOUNTS, PAY_JP_BANKS, PAY_JP_BANK_BRANCHES, and PAY_ORG_PAYMENT_METHODS_F supply the external bank account, Japanese bank master, branch master, and organization payment method details needed to format transfer records. FND_CONCURRENT_PROGRAMS and FND_CONCURRENT_REQUESTS are queried for concurrency context by LATEST_REQUEST_ID. No direct inserts or updates are documented; primary dependency is via this package being referenced by one other package.

Usage Notes

PAY_JP_MAGTAPE_PKG is invoked in the context of the Japanese payroll magnetic tape concurrent program (short name PAYJPMAG, application 801). It is typically called by the concurrent program driver, which submits the payroll action, then calls INIT followed by HEADER_RECORD, DATA_RECORD for each payment, TRAILER_RECORD, and END_RECORD. Because it is classified as OTHER, it should not be treated as a public API; customizations should call it only through the seeded concurrent program. When troubleshooting concurrent request failures, the "hr_error" search term most commonly relates to error stacks surfaced through the concurrent manager, and LATEST_REQUEST_ID provides the correlation between the payroll action and its request ID for log retrieval.