Search Results get_code_aw




Overview

ZPB_AW is a PL/SQL wrapper package owned by the APPS schema that encapsulates interaction with Oracle's OLAP Analytic Workspace (AW) engine through the DBMS_AW built-in package. Rather than allowing custom code to invoke DBMS_AW directly, the E-Business Suite exposes ZPB_AW as a controlled interface that standardizes logging, error handling, workspace initialization, and name resolution for the Advanced Planning / Demand Planning (ZPB) product family. The package body carries a header version of zpbaw.plb 120.14 dated December 2007, consistent with the 12.1.1 code line, and is consumed broadly across the application tier — the ETRM metadata records it as referenced by 27 other packages, indicating it is a foundational utility rather than an end-user entry point.

Key Procedures and Functions

The package exposes 17 documented procedures and functions grouped by functional area:

  • Command execution: EXECUTE submits a raw AW command string to DBMS_AW with statement-level FND_LOG tracing. INTERP and INTERPBOOL execute a command and capture the textual or boolean response; INTERP is flagged in source comments as deprecated in favor of the evaluator functions below.
  • Expression evaluation: EVAL_TEXT and EVAL_NUMBER evaluate AW expressions and return typed results, replacing the older INTERP-based pattern.
  • Workspace lifecycle: INITIALIZE, INITIALIZE_FOR_AC, and INITIALIZE_USER establish the AW session context for generic, analysis-cycle, and user-specific scenarios respectively. DETACH_ALL releases every attached workspace, and CLEAN_WORKSPACE removes residual session state. GET_SCHEMA resolves the operative schema name.
  • Metadata retrieval: GET_ANNOTATION_AW, GET_CODE_AW, GET_PERSONAL_AW, and GET_SHARED_AW return the appropriate Analytic Workspace to use for a given context — annotation, code (shared), personal, or generic shared usage. GET_AW_SHORT_NAME and GET_AW_TINY_NAME produce the truncated naming variants required by AW limits.

The user's search term, GET_SHARED_AW, therefore refers to the resolver that returns the shared AW designation used when no user-personal workspace applies — typically the Analysis Cycle or business-area-level workspace.

Tables Accessed

Resolution logic depends on several registration and configuration tables accessed through APPS synonyms: FND_USER identifies the current session user; ZPB_USERS and ZPB_BUSINESS_AREAS map users to planning business areas; ZPB_ANALYSIS_CYCLES ties a cycle to its workspace; and FND_APPLICATION, FND_ORACLE_USERID, and FND_PRODUCT_INSTALLATIONS provide application registration and schema-to-Oracle-user context. DBMS_AW and DBMS_LOB are invoked directly rather than read as tables.

Usage Notes

ZPB_AW is normally called from PL/SQL inside ZPB planning packages and concurrent programs, not from user-facing forms directly. Calls occur at session startup (INITIALIZE variants), before each AW command batch (workspace resolution and DETACH_ALL), and during expression evaluation. Because tracing routes through FND_LOG at statement level, DBAs can raise the runtime log level to capture all generated AW commands. Customizations should follow the documented pattern: initialize, resolve the correct workspace via the GET_*_AW family, execute commands, then clean up. Direct DBMS_AW calls bypass the logging and schema resolution provided here and are discouraged.