Search Results get_typecode




Overview

SYS.SQLJUTL is an Oracle-supplied utility package body that provides low-level support functions for the SQLJ and Oracle object-relational infrastructure. It is not an EBS business application package; it ships with the database and is listed in the ETRM repository under owner SYS with an API classification of OTHER. In the context of Oracle E-Business Suite 12.1.1 and 12.2.2, the package is part of the foundational database layer that EBS depends upon rather than a component that implements application logic. Its principal role is to answer metadata questions about stored PL/SQL units and object types, and to perform small, frequently needed data conversions between SQL, PL/SQL, and external type representations. Because the package manipulates dictionary and fixed-table metadata, it is invoked indirectly by the database and by other SYS-owned utilities rather than by EBS forms or concurrent programs directly.

Key Procedures and Functions

The documented API surface consists of nine callable units. The naming and purpose of each are as follows:

  • HAS_DEFAULT — Determines whether a stored procedure or function argument has a declared default value. It queries argument metadata for the specified owner, program unit, sequence position, optional overload, and optional package name, and returns an indicator reflecting whether a default exists.
  • GET_TYPECODE — Resolves the type code, external name, and external type for an object type identified by its type OID. It reads the type dictionary and, when multiple rows exist for the same OID, selects the row corresponding to the maximum version.
  • BOOL2INT — Converts a PL/SQL BOOLEAN value into its integer representation, preserving null.
  • INT2BOOL — Performs the inverse conversion, turning an integer back into a PL/SQL BOOLEAN value.
  • IDS2CHAR — Encodes an internal identifier representation into a character string suitable for external use.
  • CHAR2IDS — Reverses IDS2CHAR by decoding a character representation back into its internal identifier form.
  • IYM2CHAR — Converts an internal year-month interval representation into a printable character form.
  • CHAR2IYM — Converts a character representation of a year-month interval back into its internal form.
  • URI2VCHAR — Renders a uniform resource identifier into a VARCHAR2 character value.

Tables Accessed

The package reads two documented data sources. ALL_ARGUMENTS, the data dictionary view describing procedure and function arguments, is queried by HAS_DEFAULT to inspect the DEFAULTED column for a given owner, object name, sequence position, overload, and package name. TYPE$, the internal fixed table describing object types, is queried by GET_TYPECODE to obtain the type code, external name, and external type associated with a type OID, and to identify the latest version when duplicate OIDs are present. No application tables under APPS synonyms are referenced. The package does not write to any table; it is purely a read-oriented metadata and conversion utility.

Usage Notes

SYS.SQLJUTL is invoked internally by the database and by other SYS-owned packages rather than from EBS application code. The ETRM metadata records that it is referenced by three other packages, consistent with its role as a shared helper. Custom EBS development should not depend on this package: its signature, behavior, and even its existence are controlled by the database release and may change on upgrade or patching. When developers need to determine whether an argument has a default value, the supported approach is to query ALL_ARGUMENTS directly, as HAS_DEFAULT does, rather than to call the package. Similarly, boolean-to-integer conversion and interval or identifier formatting should be implemented in application-owned code. Because the API relies on fixed tables such as TYPE$, it also inherits any restrictions that apply to querying those structures in a given database environment.