Search Results ap_web_db_util_pkg




Overview

AP_WEB_DB_UTIL_PKG is a utility package in the APPS schema that supports the Oracle Payables Internet Expenses (OIE) module and its associated web-based infrastructure. Its role is not business-transactional but infrastructural: it provides low-level database helper routines consumed by the AP Web / iExpenses application stack, including exception raising, system date retrieval and formatting, calendar-day calculations, product version and application ID lookups, JavaScript string escaping, and character-to-number conversion. The package body is the implementation of the specification and, per the ETRM dependency report, holds a VALID status in both 12.1.1 and 12.2.2. It is a heavily depended-upon internal utility: the metadata records that it is referenced by 34 other packages, indicating that it sits near the base of the AP Web dependency chain rather than at its leaves.

Key Procedures and Functions

  • RAISEEXCEPTION — Centralised exception-raising routine that emits a formatted error, drawing on APP_EXCEPTION, FND_MESSAGE, and AP_WEB_INFRASTRUCTURE_PKG to surface user-facing messages consistently.
  • GETSYSDATE — Returns the current system date from the database, providing a single point of reference so callers obtain a consistent server timestamp.
  • GETFORMATTEDSYSDATE — Returns the system date pre-formatted for presentation, removing formatting logic from individual callers.
  • DAYOFWEEK — Derives the day of the week for a supplied date, used in calendar- and scheduling-related processing within iExpenses.
  • GETPRODUCTVERSION — Reads the installed product version (via FND_PRODUCT_INSTALLATIONS) so the application can adjust behaviour by release.
  • GETAPPLICATIONID — Resolves an application's internal ID from FND_APPLICATION, commonly needed for message lookups and feature checks.
  • JSPREPSTRING_LONG — Prepares long character values for safe embedding in JavaScript output.
  • JSPREPSTRING — The standard-length counterpart, escaping strings for JavaScript contexts.
  • ATLEASTPROD16 — Boolean-style version test indicating whether the installation is at release 11.5.10 / 12.x-class level or above, enabling conditional code paths.
  • CHARTONUMBER — Converts a character value to a numeric value, a common defensive utility for user-entered or imported data.

Tables Accessed

The package reads two application tables through APPS synonyms. FND_APPLICATION is queried to resolve application identifiers, and FND_PRODUCT_INSTALLATIONS is queried to determine the installed product version. Both are read-only lookups; the package is documented as not referenced by any other database object directly, and its dependency list shows only foundational objects (APP_EXCEPTION, AP_WEB_INFRASTRUCTURE_PKG, FND_MESSAGE, ICX_SEC, DUAL, STANDARD). No transactional Payables tables are touched.

Usage Notes

AP_WEB_DB_UTIL_PKG is an internal component of the AP Web infrastructure, not a public API. It is invoked from iExpenses/OIE forms and web pages, from AP_WEB_INFRASTRUCTURE_PKG, and from the 34 dependent AP Web packages that rely on its date, version, exception, and string-handling helpers. The presence of JSPREPSTRING and JSPREPSTRING_LONG reflects its use in rendering HTML/JavaScript from PL/SQL. Because ICX_SEC is referenced, some routines participate in session/security-related processing. Customisations should avoid modifying this package directly; instead, call the documented routines from custom code, particularly RAISEEXCEPTION for consistent error handling and GETPRODUCTVERSION/ATLEASTPROD16 for version-conditional logic.