Search Results check_lookup_exists




Overview

APPS.AHL_UTILITY_PVT is a private (PVT) PL/SQL utility package within the Oracle E-Business Suite Application Horizontal Library (AHL) product family. AHL provides the foundation components for Oracle quality, product lifecycle, and regulatory compliance modules, and this package supplies a set of reusable helper routines relied upon by that functional area. Because it is classified as a Private API, it is intended strictly for internal use by Oracle's own AHL code rather than as a supported public extension point for customer customization.

The package bundles heterogeneous validation and lookup helpers into a single namespace, covering foreign key verification, lookup code validation, uniqueness checks, workflow process resolution, unit naming, and operating unit security tests. Each routine is deliberately generic and parameterized, allowing calling packages to reuse common validation logic without duplicating SQL. The source header indicates a build date of 2006, making this a long-standing, stable utility library carried forward through the 12.1.1 and 12.2.2 releases.

Key Procedures and Functions

The package exposes twelve documented routines. The validation functions return FND_API.g_true or FND_API.g_false and propagate exceptions to the caller.

  • CHECK_LOOKUP_EXISTS — The routine the user searched for. It validates whether a supplied lookup code is valid against a lookup table, defaulting to FND_LOOKUP_VALUES, using the lookup type and code as its search criteria.
  • CHECK_FK_EXISTS — Confirms that a foreign key value is valid in the referenced parent table, supporting both numeric and varchar2 primary key data types and an optional additional WHERE clause.
  • CHECK_UNIQUENESS — Determines whether a candidate key already exists, with a caller-supplied WHERE clause expressing the unique key condition.
  • CHECK_STATUS_CHANGE and CHECK_STATUS_ORDER_CHANGE — Enforce the validity of status transitions and status order rule changes within the AHL status model.
  • GET_WF_PROCESS_NAME — Resolves the associated workflow process name from the workflow mapping configuration.
  • GET_UNIT_NAME — Returns a descriptive unit name for a given unit configuration.
  • GET_LOOKUP_MEANING — Retrieves the human-readable meaning for a lookup code.
  • IS_ORG_IN_USER_OU — Tests whether an organization falls within the operating unit accessible to the current user.
  • IS_Y_OR_N — Normalizes or tests a flag value against Y/N semantics.
  • DEBUG_MESSAGE and ERROR_MESSAGE — Diagnostic helpers for emitting debug output and standardized error text.

Tables Accessed

The package reads and, where relevant, writes through APPS synonyms. FND_LOOKUP_VALUES is central to the lookup validation and meaning retrieval functions. AHL_STATUS_ORDER_RULES supports the status order and status change checks, while AHL_UNIT_CONFIG_HEADERS provides unit configuration data for GET_UNIT_NAME. AHL_WF_MAPPING supplies the workflow process mapping used by GET_WF_PROCESS_NAME. MTL_PARAMETERS and CSI_II_RELATIONSHIPS are queried for organizational and relationship context, and DUAL and PLITBLM serve as supporting utility references.

Usage Notes

APPS.AHL_UTILITY_PVT is invoked programmatically by the AHL application stack and its dependent packages—forty-three other packages reference it—rather than through dedicated concurrent programs or forms. The utility validation routines are typically called at the point of data entry or record processing to enforce referential integrity, lookup validity, and status sequencing before a DML operation is committed. In custom development, CHECK_LOOKUP_EXISTS is commonly reused to validate values against FND_LOOKUP_VALUES independently of the standard forms lookup validation. Because the package is marked PVT and has not been extended with new signatures since its original release, integrators should treat its interfaces as unstable and prefer public APIs whenever they exist.