Search Results pay_in_xml_utils




Overview

PAY_IN_XML_UTILS is an Oracle EBS Oracle Payroll (Payroll India localization) utility package body owned by APPS and classified as an OTHER API. Its core responsibility is the construction and encoding of XML fragments generated by the Indian statutory payroll reporting processes, such as the tax and provident fund statements that must be produced in structured XML for regulatory filing. The package converts internal PL/SQL collection and scalar data into well-formed XML tags appended to a CLOB, and it provides helper logic for escaping and formatting text so that the resulting document is valid and safe for downstream consumption. From a technical standpoint the body is a thin formatting layer: it does not perform payroll business calculations, but instead receives already-computed data and emits the corresponding markup through DBMS_LOB operations. This division of responsibility allows report-generating packages to focus on data retrieval while relying on PAY_IN_XML_UTILS for consistent tag emission and encoding. The package is referenced by three other packages, confirming its role as a shared low-level service within the Indian Payroll module rather than an entry point invoked directly by end users.

Key Procedures and Functions

Four procedures and functions are documented in the ETRM metadata. The user's search term, ENCODE_HTML_STRING, corresponds to the function used to escape or encode a text value so that reserved characters are rendered safely within generated markup.

  • MULTICOLUMNAR — The primary XML assembly routine. It builds an opening tag from a supplied type name and then loops over an input record table, emitting a tag/value pair for each existing element. Output is appended to an IN OUT NOCOPY CLOB, which avoids unnecessary copying of large documents. The body contains debug tracing through hr_utility.debug_enabled and pay_in_utils.trace.
  • TWOCOLUMNAR — A companion routine that emits a simpler two-column tag/data structure, used where the payload follows a single name-and-value pattern rather than the multi-element layout handled by MULTICOLUMNAR.
  • GETTAG — A reusable helper that assembles the individual XML tag element for a supplied name and value. MULTICOLUMNAR calls GETTAG inside its loop, so this function centralizes tag formatting and keeps the calling code concise.
  • ENCODE_HTML_STRING — Encodes or escapes input text before it is written into the XML/HTML output, preventing special characters from breaking the document structure or producing invalid markup. This is the function typically sought when troubleshooting character corruption or unescaped entities in payroll XML output.

Tables Accessed

The documented table references resolve through APPS synonyms to DBMS_LOB and PLITBLM. DBMS_LOB is the Oracle-supplied package used for CLOB manipulation, specifically DBMS_LOB.WRITEAPPEND, which appends each generated tag fragment to the accumulating XML document. PLITBLM is the PL/SQL internal table package underlying the tXMLTable collection type used for the p_data parameter. Consequently PAY_IN_XML_UTILS reads and writes no application tables directly; all persistence and retrieval of payroll data occurs in the calling packages, and this utility operates solely in memory on the supplied collection and CLOB.

Usage Notes

PAY_IN_XML_UTILS is an internal utility rather than a directly executed program. It is normally invoked from within the XML-generation packages of the Indian Payroll module, and the ETRM metadata records that it is referenced by three other packages. Typical call paths include concurrent programs that produce statutory XML extracts, where the calling package assembles data into a tXMLTable and passes it, together with a target CLOB, into MULTICOLUMNAR or TWOCOLUMNAR. It may also be called from custom code that extends Indian payroll reporting, provided the caller supplies a properly initialized collection and an open CLOB locator. When diagnosing encoding defects, the appropriate fix is generally at the ENCODE_HTML_STRING boundary rather than in the calling report. Debug tracing is controlled through the standard HR debug flag, so enabling HR utility debugging produces trace lines identifying the invoked procedure and its parameters.