Search Results fnd_iso_character_set_map




Overview

APPS.PAY_XML_GEN_PKG is a PL/SQL package within the Oracle E-Business Suite Payroll (PAY) module whose primary responsibility is to generate and normalize XML output produced by report mapping functions. The package acts as a wrapper around user-defined or seeded report mapping functions, executing them dynamically and ensuring that the resulting XML document contains a well-formed XML declaration header positioned correctly at the top of the document. This is particularly important in the context of Oracle Payroll XML reporting, where downstream consumers such as BI Publisher templates, regulatory extract formats, and external interfaces require a valid XML prolog with consistent encoding declarations.

The package addresses a recurring technical issue: report mapping functions often return XML content without a proper header, or with header fragments embedded at arbitrary positions. PAY_XML_GEN_PKG resolves the character set declaration by consulting the FND_ISO_CHARACTER_SET_MAP lookup, then reconstructs the output CLOB with a standardized XML header, preserving the original payload that follows.

Key Procedures and Functions

The ETRM documentation identifies a single documented procedure within the package body:

  • EXEC_REPORT_MAP_FUNCTION — Executes a named report mapping function dynamically using EXECUTE IMMEDIATE, passing the supplied parameters along with a template name and an output binding for the XML CLOB. After the function completes, the procedure reconstructs the returned XML payload: it locates existing XML declaration markers, strips or repositions them, inserts a canonical <?xml version="1.0"?> header, and writes the remaining content into a temporary LOB. A cursor against FND_LOOKUP_VALUES retrieves the appropriate character set tag based on the session's NLS language, enabling correct encoding handling. Bug fix 5967599 is referenced in the source to handle cases where the input XML does not contain a header at all.

Tables Accessed

The package references the following objects through APPS synonyms:

  • FND_LOOKUP_VALUES — Read-only. Queried with lookup_type FND_ISO_CHARACTER_SET_MAP, matching the lookup_code derived from the ISO portion of USERENV('LANGUAGE') and restricted to language = 'US'. This lookup supplies the character set tag used to build the XML encoding declaration, which is directly relevant to searches involving fnd_iso_character_set_map.
  • DBMS_LOB — Utilized extensively for CLOB manipulation: createtemporary, open, instr, copy, writeappend, and getlength. These calls manage the temporary output LOB and the parse-and-reassemble logic for the XML header.

Usage Notes

PAY_XML_GEN_PKG is an internal helper invoked indirectly by Oracle Payroll XML report generation processes rather than being called directly from forms. It is typically triggered when a report mapping function is registered against a payroll XML report definition; the payroll engine calls EXEC_REPORT_MAP_FUNCTION to run that mapping function and obtain the finalized XML.

Because it is classified as OTHER and is not referenced by any documented package in ETRM, customization should be approached cautiously. Customers extending payroll XML output frequently trace fnd_iso_character_set_map lookups to this package when diagnosing encoding or header-related XML parsing failures. The package exists in both EBS 12.1.1 and 12.2.2, and its behaviour is consistent across those releases, with the character set resolution and header reconstruction logic being the key operational concerns.