Search Results get_cgi_env




Overview

OWA_UTIL is a utility package owned by the SYS schema and exposed to Oracle E-Business Suite applications through the OWAPUB synonym, which makes its PL/SQL interfaces callable from APPS-tier code. The package supplies low-level helper routines that support the Oracle Web Agent (OWA) and PL/SQL Toolkit (HTP/HTF) architecture used historically by EBS for browser-based rendering and diagnostics. It provides procedures for interrogating the PL/SQL dictionary, emitting HTTP headers and status lines, performing browser redirects, formatting HTML tables, and printing generated pages from a SQL*Plus or server-side context. In EBS 12.1.1 and 12.2.2 the package is classified as a UTIL object in the ETRM repository and continues to serve as the plumbing layer beneath custom web-enabled forms, JSP integration points, and diagnostic utilities. The user search term redirect_url corresponds to one of the package's most frequently referenced procedures, REDIRECT_URL, which issues an HTTP redirect directive to the client browser.

Key Procedures and Functions

The ETRM metadata documents 55 procedures and functions in OWAPUB.OWA_UTIL. Principal groups include:

  • Dictionary and source inspection: NAME_RESOLVE, SHOWSOURCE, SIGNATURE. NAME_RESOLVE resolves a stored program name into owner and procedure components. SHOWSOURCE prints the PL/SQL source of a procedure, function, package, or package member. SIGNATURE emits a footer line identifying the generating agent and, optionally, a link to the source.
  • HTTP control: MIME_HEADER, STATUS_LINE, HTTP_HEADER_CLOSE, REDIRECT_URL. These routines construct the response header block, set the HTTP status code, close the header section before body output, and direct the browser to an alternate URL.
  • CGI and environment: GET_CGI_ENV, PRINT_CGI_ENV, GET_OWA_SERVICE_PATH. These expose and display common gateway interface variables and the service path resolved by the web listener.
  • Page output: SHOWPAGE, SHOW_QUERY_COLUMNS. SHOWPAGE flushes an HTP/HTF-generated page to the client when running under SQL*Plus or SQL*DBA. SHOW_QUERY_COLUMNS prints column metadata for a query.
  • HTML table helpers: TABLEPRINT, COMMA_TO_IDENT_ARR, TABLEOPEN, TABLECAPTION, TABLEHEADERROWOPEN, TABLEHEADER, TABLEHEADERROWCLOSE, TABLEROWOPEN. These support the generation of tabular HTML output from PL/SQL.

Tables Accessed

The ETRM metadata records no direct table references for OWAPUB.OWA_UTIL and no APPS synonyms are documented for it. This is consistent with a utility package that relies on the PL/SQL dictionary through dynamic SQL and on server-provided environment variables rather than on EBS application tables. The package does not appear as a consumer of business data, so no EBS base tables, interface tables, or views are documented as accessed.

Usage Notes

OWA_UTIL is invoked when custom web-enabled PL/SQL must emit HTTP headers, perform a redirect, or render HTML output. In EBS 12.1.1 and 12.2.2 it is commonly referenced from custom JSP-backed servlets, from diagnostic scripts executed via SQL*Plus against the APPS schema, and from older OWA-based integrations. The REDIRECT_URL procedure — the object matching the user's search — is typically called at the top of a PL/SQL web procedure to hand control to another URL after validation or login redirection. The package is referenced by 8 other EBS packages per the ETRM metadata, confirming its role as a shared utility dependency. Because it is owned by SYS and synonymed as OWAPUB, callers should reference it through the OWAPUB synonym rather than through direct SYS qualification, and should note that HTTP header procedures must be invoked before any body content is written to avoid runtime errors in the OWA runtime.