Search Results instead_of_trg
Overview
OKC_P_UTIL is a utility package in the Oracle Contracts (OKC) application module of Oracle E-Business Suite. It is classified as a UTIL (utility) API, meaning it does not model a business entity or expose a transactional business service; rather, it supplies low-level helper routines consumed by other components of the Contracts schema. The package is owned by APPS and is documented for both EBS 12.1.1 and 12.2.2, with the source header dating to 2005 and shipping as part of the standard Contracts code line. Its functions support version formatting, datatype conversion, dynamic SQL execution, and a workaround for view-related trigger logic. Because it is a utility layer, it has no direct user-facing behavior; its value derives from reuse across the many dependent packages that call it.
Key Procedures and Functions
- VERSION_STRING — A function that converts a major and minor version number pair into a formatted string, used for rendering version information in views. It is declared with RESTRICT_REFERENCES pragmas (WNPS, WNDS), confirming it performs no writes to package or database state and is safe for use inside SQL and view definitions.
- RAW_TO_NUMBER — A function that converts a RAW value into a NUMBER, providing a deterministic datatype conversion helper for internal Contracts processing.
- EXECUTE_SQL — A function that executes arbitrary SQL through dynamic SQL and returns an INTEGER result. This is the routine associated with the user's search term "execute_sql" and is the package's most consequential member, since it permits callers to run dynamically constructed statements.
- INSTEAD_OF_TRG — A procedure documented as encapsulating logic intended to run in a view instead of in triggers, reflecting the Contracts design pattern of shifting behavior out of DML triggers into view-based logic.
Tables Accessed
The documented metadata references no application tables. The only dependency recorded is DBMS_SQL, accessed through an APPS synonym. This confirms that EXECUTE_SQL relies on the Oracle-supplied DBMS_SQL package to parse, bind, and execute dynamic statements, and that OKC_P_UTIL itself does not directly read or write Contracts base tables. Any table access occurs only through SQL text supplied by the caller at runtime, which places the responsibility for correct and safe statements on the invoking program.
Usage Notes
OKC_P_UTIL is an internal utility package rather than a public integration API. It is not typically invoked directly from Oracle Forms or concurrent programs; instead it is called by other PL/SQL units within the Contracts schema. The ETRM metadata records that the package is referenced by 395 other packages, indicating extremely broad internal reuse and making it a foundational dependency of the Contracts code line.
Because EXECUTE_SQL performs dynamic SQL, callers should treat it with the same care as any dynamic execution mechanism: statements must be fully controlled by the calling code, never assembled from unvalidated user input, and privileges are those of the APPS schema. The presence of RESTRICT_REFERENCES pragmas on VERSION_STRING and RAW_TO_NUMBER indicates these two functions are intended to be callable from SQL and views, where purity constraints apply. Customizations should avoid modifying this package directly, as patching in 12.1.1 and 12.2.2 may overwrite changes; extension logic is better placed in separate custom packages that call these utilities read-only.
-
PACKAGE: APPS.OKC_P_UTIL
12.2.2
-
PACKAGE: APPS.OKC_P_UTIL
12.1.1
-
PACKAGE BODY: APPS.OKC_P_UTIL
12.2.2
-
PACKAGE BODY: APPS.OKC_P_UTIL
12.1.1