Search Results customer_contact_email2




Overview

PV_SQL_UTILITY is a helper PL/SQL package owned by APPS in the Oracle E-Business Suite, shipped as part of the CRM/TeleSales (Oracle Sales, "AS") technology stack. Its $Header comment (pvsqluts.pls 120.3, dated 2005/12/19) indicates it has been stable since the early 11i era and remains present, unchanged in purpose, in both EBS 12.1.1 and 12.2.2. The package is declared AUTHID CURRENT_USER, meaning its SQL executes with the privileges of the calling session rather than the definer, and its functions are designed to be embedded directly in SQL statements (for example, in a SELECT list or WHERE clause) to translate stored codes and foreign keys into human-readable descriptions.

The package serves as a lightweight "lookup and attribute retrieval" layer. Rather than requiring application code to join repeatedly to FND_LOOKUP_VALUES, FND_TERRITORIES_TL, HZ_PARTIES, HZ_CONTACT_POINTS, and the Sales foundation tables, callers invoke a single function that returns a scalar VARCHAR2. In this respect, AR_LOOKUP — the function the user searched for under "ar_lookup" — is one of several sibling lookup resolvers, alongside PV_LOOKUP, AS_LOOKUP, and FND_LOOKUP_VALUES.

Key Procedures and Functions

The package exposes 22 documented functions (no public procedures). They fall into four logical groups:

Tables Accessed

The functions read (and do not write) the following tables through APPS synonyms:

Usage Notes

PV_SQL_UTILITY has no documented dependencies on other packages and is referenced by zero other packages in the ETRM metadata, indicating it is invoked directly by Oracle Forms, OAF pages, concurrent programs, and customer extensions rather than being called internally by other PL/SQL APIs. Because each function returns a single VARCHAR2, it is most commonly embedded inside a SELECT statement — for example, SELECT pv_sql_utility.ar_lookup(code, type) FROM ... — to avoid hand-coded joins. The AUTHID CURRENT_USER declaration means the caller must have SELECT privileges on the underlying tables (typically granted via the APPS schema and standard EBS responsibilities), and calls should be avoided in high-volume loops because each invocation issues its own SQL. Callers should also confirm that the lookup type passed to AR_LOOKUP belongs to the AR namespace; passing a type owned by another product returns NULL rather than raising an error, since the resolvers are designed to be null-safe within SQL expressions.