Results for “constrained_code”
2 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
OKC_ROLES_V is a read-only database view owned by the APPS schema in Oracle E-Business Suite, belonging to the OKC (Contracts Core) product family. It exposes contract role definitions in a language-resolved, user-facing format suitable for reporting, integration, and inquiry screens. Rather than presenting raw transactional data, the view surfaces the configurable role codes that drive the Oracle Contracts module, including whether a role is a customer or vendor role, whether it is associated with the SFWT (Supplier/Financing/Withholding Tax) designation, and the translated meaning and description for the session language. The view resolves the language dimension automatically through the USERENV('LANG') function, ensuring that query results reflect the current session's NLS language setting without requiring the caller to filter by LANGUAGE explicitly. Because it is documented with a VALID status in ETRM 12.2.2, it is a supported reference point for both functional customization and technical integration work across EBS 12.1.1 and 12.2.2.
Underlying Base Objects
The view is defined over two synonym-backed base tables: OKC_ROLES_B and OKC_ROLES_TL. OKC_ROLES_B holds the base (language-independent) role attributes, including CODE, CONSTRAINED_RLE_CODE, CUSTOMER_VENDOR_FLAG, OBJECT_VERSION_NUMBER, and the standard audit and date-effective columns. OKC_ROLES_TL provides the translated (language-dependent) columns SFWT_FLAG, MEANING, and DESCRIPTION, one row per installed or enabled language. The join condition links the two objects on CODE (RLEB.CODE = RLET.CODE) and restricts the translation row to the runtime language via RLET.LANGUAGE = USERENV('LANG'). This inner-join pattern means a role is visible only when a translation row exists for the current language. The view also projects RLEB.ROWID as ROW_ID to give each returned row a stable, addressable identifier.
Key Columns
- ROW_ID – The ROWID of the underlying OKC_ROLES_B row; useful as a unique key for mapping and updates.
- CODE – The role code; the primary business identifier and the join key between base and translation rows.
- CONSTRAINED_CODE – Derived from CONSTRAINED_RLE_CODE; identifies a constraining role code where role usage is restricted.
- CUSTOMER_VENDOR_FLAG – Indicates whether the role is a customer role or a vendor role; central to contract party assignment logic.
- SFWT_FLAG – The SFWT designation sourced from the translation table.
- MEANING – The translated display name of the role, suitable for LOVs and report labels.
- DESCRIPTION – The translated descriptive text for the role.
- OBJECT_VERSION_NUMBER – Optimistic locking / concurrency version stamp for the base row.
- START_DATE / END_DATE – Effective dating for the role definition.
- CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN – Standard EBS audit columns supporting traceability and WHO-column reporting.
Common Use Cases and Queries
Typical uses include populating role selection lists in custom contract extensions, validating role codes during inbound interface loads, and building role-driven reports. The language resolution makes the view ideal for localized reporting without additional joins to the _TL table.
- List all roles with meanings:
SELECT code, meaning, customer_vendor_flag, sfwt_flag FROM okc_roles_v ORDER BY meaning; - Retrieve customer roles only:
SELECT code, meaning FROM okc_roles_v WHERE customer_vendor_flag = 'C'; - Resolve a single role code:
SELECT meaning, description FROM okc_roles_v WHERE code = :p_code; - Join to contract parties for reporting:
SELECT r.meaning, p.* FROM okc_roles_v r, okc_contract_parties p WHERE r.code = p.role_code;
Because the view is restricted to the session language, integrators should confirm that a translation row exists for the target language before relying on the view in batch processes; otherwise, rows may be silently excluded by the inner join.