Search Results dsql_init
Overview
QA_CORE_PKG is a foundational PL/SQL package body in the Oracle EBS Quality Management (QA) module, owned by the APPS schema and documented as VALID. It serves as a low-level utility and data-access layer that supports the higher-level Quality APIs, most notably QA_CHARS_API, QA_PLANS_API, and QA_PLAN_ELEMENT_API. Rather than representing a business entity directly, the package consolidates reusable logic for resolving identifiers, retrieving descriptive attributes, validating mandatory configuration, and executing dynamically constructed SQL. In this role it functions as a shared service layer consumed by sibling packages within the Quality schema. The ETRM metadata classifies it under an API classification of OTHER, reflecting its internal, infrastructure-oriented purpose, and confirms that it is referenced by nine other database objects while itself referencing standard Oracle utilities such as DBMS_SQL, DBMS_STANDARD, and FND_DSQL. This dependency profile indicates that QA_CORE_PKG both borrows from Oracle's built-in dynamic SQL facilities and exposes functionality back to the Quality application stack.
Key Procedures and Functions
The package exposes sixteen documented procedures and functions, grouped here by purpose:
- Identifier resolution: GET_PLAN_ID, GET_ELEMENT_ID, GET_PLAN_NAME, and GET_RESULT_COLUMN_NAME resolve surrogate keys or descriptive names for plans, plan elements, and result columns. These are used by callers that hold a user-facing value and need the corresponding internal identifier, or vice versa.
- Attribute retrieval and validation: GET_ELEMENT_DATA_TYPE returns the datatype associated with a quality element, while IS_MANDATORY determines whether a given element is required. These support UI validation and defaulting behavior.
- Dynamic SQL utilities: EXEC_SQL, EXEC_SQL_WITH_BINDS, DEQUOTE, DSQL_INIT, DSQL_ADD_TEXT, DSQL_ADD_BIND, and DSQL_EXECUTE form a self-contained dynamic SQL framework. DSQL_INIT, DSQL_ADD_TEXT, and DSQL_ADD_BIND accumulate a statement and its bind values, DSQL_EXECUTE runs it, and DEQUOTE strips quoting characters. EXEC_SQL and EXEC_SQL_WITH_BINDS offer simpler entry points for executing a statement, optionally with bind variables, leveraging DBMS_SQL internally.
No parameter lists are asserted here, as the documented metadata does not specify them.
Tables Accessed
The package reads from QA_CHARS and QA_PLANS through APPS synonyms, and additionally references DBMS_SQL and PLITBLM. Access to QA_CHARS supports character and element attribute lookups such as datatype and mandatory status, while QA_PLANS underpins plan identifier and name resolution. DBMS_SQL is invoked for dynamic statement execution, and PLITBLM provides the PL/SQL table (index-by table) utilities used in constructing and managing bind arrays. The package does not appear to own transactional tables; its role is predominantly read-oriented lookup and dynamic execution rather than data maintenance.
Usage Notes
QA_CORE_PKG is typically invoked indirectly rather than called directly by end users. Quality forms and the higher-level QA_CHARS_API, QA_PLANS_API, and QA_PLAN_ELEMENT_API packages call its lookup and validation routines during element definition, plan setup, and result capture. Custom code extending Oracle Quality may call the identifier and attribute functions to obtain consistent resolution logic. The dynamic SQL helpers are most appropriate where a result column or datatype is determined at runtime. Because the package is referenced by nine other objects and references none above it in the Quality hierarchy, it should be treated as a stable internal dependency; modifications require regression attention across all dependent packages.