Search Results to_utf8




Overview

APPS.PAY_IE_P60XML is an Oracle E-Business Suite payroll utility package that supports Irish statutory P60 end-of-year reporting. The P60 is the annual tax certificate issued to employees in the Republic of Ireland under PAYE, and it must be produced from the completed payroll year's cumulative tax, PRSI, and income levy data. This package encapsulates the server-side logic required to assemble, format, and emit the P60 report, including the transformation of internal Oracle data into XML and RTF-ready binary content for external delivery.

The package header and body carry the standard version banner associated with the 12.1.1 and 12.2.2 code lines. A noteworthy implementation detail is the explicit use of UTF-8 conversion. Because P60 output may include Irish-language diacritics and employee-provided characters, the package applies character set conversion routines (including a to_utf8-style transformation) when materialising XML and RTF payloads, ensuring the generated artifact is correctly encoded regardless of the database character set. The package is not referenced by any other package, so it is effectively a self-contained generator consumed directly by its calling concurrent program.

Key Procedures and Functions

  • GET_P60_DETAILS — Retrieves the underlying dataset required for the P60 certificate. It resolves assignment sets and assignment set amendments (via the typed collection t_asg_set_amnds declared in the body), then gathers cumulative payroll figures for the selected population.
  • POPULATE_P60_DETAILS — Takes the dataset returned by GET_P60_DETAILS and stages it into the structures used for report rendering, applying inclusion/exclusion amendment rules so that the correct employee population is certified.
  • WRITETOCLOB — Writes generated character data into a CLOB, performing the UTF-8 conversion so that multi-byte characters are preserved. This routine is the primary reason a search for to_utf8 surfaces this object and is central to producing a valid XML P60.
  • CLOB_TO_BLOB — Converts the completed CLOB representation into a BLOB, enabling binary storage and attachment
  • FETCH_RTF_BLOB — Fetches an RTF BLOB, typically a formatted template or rendered document, for association with the P60 output.

Tables Accessed

The package reads payroll and HR data through APPS synonyms. Employee assignments, periods of service, and organisation units come from PER_ALL_ASSIGNMENTS_F, PER_PERIODS_OF_SERVICE, and HR_ALL_ORGANIZATION_UNITS. Assignment set selection logic uses HR_ASSIGNMENT_SETS, HR_ASSIGNMENT_SET_CRITERIA, and HR_ASSIGNMENT_SET_AMENDMENTS. Payroll results and balances are drawn from PAY_PAYROLL_ACTIONS, PAY_ASSIGNMENT_ACTIONS, PAY_ALL_PAYROLLS_F, PAY_ACTION_INFORMATION, and the Irish-specific PAY_IE_PAYE_DETAILS_F and PAY_IE_PRSI_DETAILS_F tables. FND_LOBS, DBMS_LOB, and NLS_DATABASE_PARAMETERS support the CLOB/BLOB handling and character set determination for the UTF-8 conversion.

Usage Notes

PAY_IE_P60XML is invoked from the Irish P60 end-of-year concurrent program, submitted after payroll year close once all assignment actions are complete. It is not exposed through a user-facing form API and is not called by other PL/SQL packages, so customisations should treat it as an internal report generator. The POPULATE_P60_DETAILS and WRITETOCLOB sequence must run within a single concurrent request to ensure the UTF-8 converted CLOB/BLOB pair is consistent. Because the source banner references a 2008 fix, administrators running 12.2.2 should confirm the applied patch level before extending the package, as later AD patches may alter encoding behaviour.