Search Results protected_yn
Overview
OKC_REPORT_SQL_B is a table in the OKC (Contracts Core) schema of Oracle E-Business Suite, present in both 12.1.1 and 12.2.2. Its documented purpose is contract printing: it stores the SQL query text used by the sql-xml-xsl-html report generation path that produces printed contract documents. In effect, the table acts as a repository of the data-extraction statements that feed the contract printing pipeline, decoupling the report definition from the application code so that the query driving a given print layout can be identified and versioned independently.
From a modeling perspective, the ETRM metadata classifies OKC_REPORT_SQL_B as standalone, a heuristic Data Vault classification. This is consistent with the documented absence of any unique business key: apart from the surrogate primary key, all columns are descriptive or auditing attributes. A data vault design would therefore not require a separate hub for this table, and it would be modeled as a satellite over the report SQL identifier if it were included in an analytical warehouse.
Key Information Stored
The table carries 14 documented columns. The most significant are listed below.
- ID — surrogate primary key, enforced by the OKC_REPORT_SQL_B_PK constraint and also covered by unique index OKC_REPORT_SQL_B_U1. It uniquely identifies each stored query record.
- SQL_TEXT — the principal payload column; holds the SQL statement executed to retrieve contract data for the sql-xml-xsl-html printing report.
- VIEW_NAME — associates the stored query with the view or reporting entity against which it is intended to run.
- CACHE_YN — flag controlling whether the query result is cached during contract printing.
- PROTECTED_YN — indicates that the record is protected from modification, typically for seeded queries shipped by Oracle.
- START_DATE and END_DATE — enable date-effective behavior, allowing multiple versions of a query to coexist over time.
- OBJECT_VERSION_NUMBER — optimistic locking column used by the OAF framework during concurrent updates.
- CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN — standard EBS auditing columns recording who created and last changed each row.
- SECURITY_GROUP_ID — the only documented foreign key column, referencing FND_SECURITY_GROUPS for multi-org security filtering.
Common Use Cases and Queries
The primary operational scenario is diagnosing or customizing contract printing. When a printed contract returns unexpected content, the underlying query can be retrieved by ID or by view name.
- Retrieving the query for a specific report record:
SELECT sql_text FROM okc.okc_report_sql_b WHERE id = :id; - Listing active, protected queries for a report entity:
SELECT id, view_name, sql_text FROM okc.okc_report_sql_b WHERE protected_yn = 'N' AND SYSDATE BETWEEN start_date AND NVL(end_date, SYSDATE + 1); - Auditing change history of contract print queries via the CREATED_BY and LAST_UPDATED_BY columns.
- Joining to FND_SECURITY_GROUPS on SECURITY_GROUP_ID to confirm which security group owns a query.
Because SQL_TEXT is stored data rather than compiled code, warehouse or audit extracts should treat it as free text and avoid executing it outside the supported contract printing path.
Related Objects
- FND_SECURITY_GROUPS — referenced through OKC_REPORT_SQL_B.SECURITY_GROUP_ID; restricts query visibility by security group.
- OKC_REPORT_SQL_B_PK — the primary key constraint on ID.
- OKC_REPORT_SQL_B_U1 — unique index on ID, a candidate business key.
- OKC_REPORT_LAYOUTS / OKC_REPORT_PARAMETERS — adjacent contract printing configuration objects that consume the same query records.
- OKC_CORE_REPORT and the OKC contract printing concurrent programs — runtime consumers of the stored SQL when generating sql-xml-xsl-html output.
- FND_USER — implicit reference for the CREATED_BY and LAST_UPDATED_BY columns.
-
Table: OKC_REPORT_SQL_B
12.1.1
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_REPORT_SQL_B, object_name:OKC_REPORT_SQL_B, status:VALID, product: OKC - Contracts Core , description: Used for Contract Printing. Keeps query for the sql-xml-xsl-html report. , implementation_dba_data: OKC.OKC_REPORT_SQL_B ,
-
Table: OKC_REPORT_SQL_B
12.2.2
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_REPORT_SQL_B, object_name:OKC_REPORT_SQL_B, status:VALID, product: OKC - Contracts Core , description: Used for Contract Printing. Keeps query for the sql-xml-xsl-html report. , implementation_dba_data: OKC.OKC_REPORT_SQL_B ,
-
Table: OKC_REPORT_XSL_TL
12.1.1
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_REPORT_XSL_TL, object_name:OKC_REPORT_XSL_TL, status:VALID, product: OKC - Contracts Core , description: Used for Contract Printing. Stylesheet that drives XSLT in sql-xml-xsl-html report.Help text about tokens defined in stylesheet, usage: for Articles writer. , implementation_dba_data: OKC.OKC_REPORT_XSL_TL ,
-
Table: OKC_REPORT_XSL_TL
12.2.2
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_REPORT_XSL_TL, object_name:OKC_REPORT_XSL_TL, status:VALID, product: OKC - Contracts Core , description: Used for Contract Printing. Stylesheet that drives XSLT in sql-xml-xsl-html report.Help text about tokens defined in stylesheet, usage: for Articles writer. , implementation_dba_data: OKC.OKC_REPORT_XSL_TL ,
-
Table: OKC_LINE_STYLES_B
12.2.2
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_LINE_STYLES_B, object_name:OKC_LINE_STYLES_B, status:VALID, product: OKC - Contracts Core , description: OKC_LINE_STYLES provides meta-data that governs how lines may be defined in a contract. , implementation_dba_data: OKC.OKC_LINE_STYLES_B ,
-
Table: OKC_LINE_STYLES_B
12.1.1
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_LINE_STYLES_B, object_name:OKC_LINE_STYLES_B, status:VALID, product: OKC - Contracts Core , description: OKC_LINE_STYLES provides meta-data that governs how lines may be defined in a contract. , implementation_dba_data: OKC.OKC_LINE_STYLES_B ,
-
View: OKC_LINE_STYLES_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_LINE_STYLES_V, object_name:OKC_LINE_STYLES_V, status:VALID, product: OKC - Contracts Core , description: View for table OKC_LINE_STYLE_B , implementation_dba_data: APPS.OKC_LINE_STYLES_V ,
-
View: OKC_LINE_STYLES_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_LINE_STYLES_V, object_name:OKC_LINE_STYLES_V, status:VALID, product: OKC - Contracts Core , description: View for table OKC_LINE_STYLE_B , implementation_dba_data: APPS.OKC_LINE_STYLES_V ,
-
View: OKC_REPORT_SQL_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_REPORT_SQL_V, object_name:OKC_REPORT_SQL_V, status:VALID, product: OKC - Contracts Core , description: Used in Contract Printing. Keeps query and help text for XSL writer. , implementation_dba_data: APPS.OKC_REPORT_SQL_V ,
-
View: OKC_REPORT_XSL_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_REPORT_XSL_V, object_name:OKC_REPORT_XSL_V, status:VALID, product: OKC - Contracts Core , description: Used in Contract Printing. Keeps stylesheet for sql-xml-xsl-html contract printing. , implementation_dba_data: APPS.OKC_REPORT_XSL_V ,
-
View: OKC_REPORT_SQL_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_REPORT_SQL_V, object_name:OKC_REPORT_SQL_V, status:VALID, product: OKC - Contracts Core , description: Used in Contract Printing. Keeps query and help text for XSL writer. , implementation_dba_data: APPS.OKC_REPORT_SQL_V ,
-
View: OKC_REPORT_XSL_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_REPORT_XSL_V, object_name:OKC_REPORT_XSL_V, status:VALID, product: OKC - Contracts Core , description: Used in Contract Printing. Keeps stylesheet for sql-xml-xsl-html contract printing. , implementation_dba_data: APPS.OKC_REPORT_XSL_V ,