Search Results escape_characters




Overview

APPS.PER_CALENDAR_UTIL is a utility package body in the Oracle E-Business Suite Human Capital Management (HCM) product family, sitting within the PER (Human Resources) schema and deployed under the APPS owner. Its business function is to provide reusable calendar and time-conversion services consumed by Oracle HRMS and related applications. The package is classified as a UTIL API in the ETRM metadata, indicating that it is intended as an internal helper library rather than a business-facing API. Two distinct responsibilities are evident from the source: time zone conversion and the generation of iCalendar (RFC 5545 / vCalendar 2.0) text streams used when Oracle EBS must publish meeting or absence information as an ICS attachment. The package header comment identifies the file as pecalutl.pkb, with the last recorded version dated 19 November 2008 under the 12.0.12010000 release line, which remains the shipped implementation through EBS 12.1.1 and 12.2.2.

Key Procedures and Functions

The documented procedures and functions exposed by this package fall into the following categories.

  • CONVERT_TIMEZONE — Converts a supplied DATE value from an originating time zone into Greenwich Mean Time. This is the routine returned when a user searches for "convert_timezone". It accepts a date and an optional source time zone, defaulting to the database time zone, and returns the adjusted date. Internally it delegates to FND_TIMEZONE_PUB.adjust_datetime, so the actual offset and daylight-saving logic is owned by the Foundation time zone API rather than by PER_CALENDAR_UTIL itself.
  • ESCAPE_CHARACTERS — A private helper function that escapes backslash, comma, and semicolon characters within a string. This escaping is required by the iCalendar format, where those characters carry structural meaning inside property values.
  • CALENDAR_GENERATE_ICAL_STRING — The package's principal iCalendar builder. It assembles a VCALENDAR stream containing version, product identifier, method, and a VEVENT block with start, end, UID, and timestamp properties, plus optional description and location lines. The ETRM metadata records the documented procedure set under the shortened name CALENDAR_GENERATE_ICAL. Two constants, DATEICALFORMAT ('yyyyMMdd') and TIMEICALFORMAT ('HH24MIss'), define the date and time masks used when formatting dates for the calendar output.

Tables Accessed

The documented table reference list for this package contains only DUAL, accessed through the APPS synonym layer. This is consistent with the implementation: the package performs pure string manipulation and delegates time zone arithmetic to FND_TIMEZONE_PUB, so no application tables are read or written. DUAL appears in the standard context of PL/SQL expression evaluation and format validation. The absence of HR, PER, or FND base tables from the reference list confirms that PER_CALENDAR_UTIL is functionally stateless with respect to the EBS data model.

Usage Notes

PER_CALENDAR_UTIL is not exposed through a dedicated concurrent program or form. It is invoked indirectly: the ETRM metadata records that the package is referenced by one other package, which supplies the functional context — typically an absence, vacation, or resource-scheduling feature that needs either a GMT-normalised timestamp or an ICS payload for e-mail delivery. Customisations should call CONVERT_TIMEZONE rather than re-implementing time zone arithmetic, because the underlying Foundation API applies the correct historical offset and daylight-saving rules. When generating calendar content, callers must supply pre-formatted date and time strings; the package does not reformat them, and the DATEICALFORMAT and TIMEICALFORMAT constants indicate the expected layout. Because the package is classified as a utility, Oracle does not guarantee backward compatibility of its internals between releases; custom code should depend only on the documented signatures and should be re-validated when applying 12.2.2 patches. Note that CALENDAR_GENERATE_ICAL_STRING writes into an OUT NOCOPY VARCHAR2 buffer, and the optional primary key argument is appended to the UID to make event identifiers unique across recurring records.