Search Results okc_time_code_units_b_pk




Overview

OKC_TIME_CODE_UNITS_B is a foundational setup table within the Oracle Contracts Core (OKC) module. Its primary function is to establish a mapping between user-defined units of measure stored in the inventory master table, MTL_UNITS_OF_MEASURE, and standardized, known time units recognized by the Contracts application. As contracts frequently involve terms expressed in durations—such as a '30-day' period, a '12-month' subscription, or a '2-year' warranty—this table is essential for normalizing diverse unit definitions into a consistent format for processing, calculations, and reporting.

The table's structure includes a composite primary key defined by the OKC_TIME_CODE_UNITS_B_PK constraint, which comprises the UOM_CODE and TCE_CODE columns. A unique index, OKC_TIME_CODE_UNITS_B_U1, provides an alternate business key on the same columns in reverse order (TCE_CODE, UOM_CODE). Based on the heuristic Data Vault classification provided in the metadata, this table is modeled as a standalone entity, suggesting it functions independently without direct foreign key dependencies to other core contract entities, though it is referenced by them.

Key Information Stored

The OKC_TIME_CODE_UNITS_B table is primarily a mapping and configuration table. Its key columns store the essential information for unit conversion and identification:

  • TCE_CODE: The core time code. This is the internal, standardized code representing a known time unit (e.g., 'DAY', 'MONTH', 'YEAR').
  • UOM_CODE: The Unit of Measure code. This value corresponds to a user-defined unit within the MTL_UNITS_OF_MEASURE table. It is the value being mapped to the standard TCE_CODE.
  • QUANTITY: This column holds the conversion factor. It defines the quantity of the base TCE_CODE unit that is equivalent to one UOM_CODE unit. For example, if UOM_CODE is 'WORK-WEEK' and TCE_CODE is 'DAY', the QUANTITY might be 5.
  • ACTIVE_FLAG: A status indicator that enables or disables a specific mapping, allowing administrators to control which unit conversions are currently valid for use within the system.

Additionally, the table includes standard EBS audit columns (CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE) for tracking record modifications, an OBJECT_VERSION_NUMBER for optimistic locking, and 15 descriptive flexfield (DFF) attribute columns (ATTRIBUTE1-15) for potential custom extensions. The SECURITY_GROUP_ID column links the record to a specific security group, as indicated by the foreign key relationship to FND_SECURITY_GROUPS.

Common Use Cases and Queries

The primary use case for OKC_TIME_CODE_UNITS_B is to enable accurate contract term processing. When a contract is authored with a duration specified in a non-standard UOM, the application uses this table to convert that duration into a standard time code for calculations related to billing schedules, renewals, or expirations. A typical query to resolve a user-defined UOM to its standard time code would be:

SELECT TCE_CODE, QUANTITY FROM OKC.OKC_TIME_CODE_UNITS_B WHERE UOM_CODE = :p_uom_code AND ACTIVE_FLAG = 'Y';

Reporting on the available conversions is another common scenario. For instance, a systems administrator might run a query to audit all active time unit mappings:

SELECT UOM_CODE, TCE_CODE, QUANTITY FROM OKC.OKC_TIME_CODE_UNITS_B WHERE ACTIVE_FLAG = 'Y' ORDER BY UOM_CODE;

Related Objects

While the Data Vault classification suggests it is standalone, OKC_TIME_CODE_UNITS_B is functionally dependent on and referenced by several other EBS objects.

  • MTL_UNITS_OF_MEASURE: This is the master source for the UOM_CODE values. A join on UOM_CODE is required to retrieve the descriptive name and other attributes of the user-defined unit.
  • OKC_TIME_CODE_UNITS_TL: This is the multilingual translation table corresponding to the _B table. It stores language-specific descriptions for the UOM_CODE and TCE_CODE combinations, joined via the primary key columns.
  • FND_SECURITY_GROUPS: This table is referenced by the SECURITY_GROUP_ID foreign key, linking each time code unit record to a specific security profile.
  • OKC_CONTRACTS / OKC_LINES: Contract header and line tables use the TCE_CODE and UOM_CODE from this table to define the duration and periods for contract terms. A join on these codes is implicit during contract processing.
  • OKC_TERMS_TL & OKC_TERMS_B: These tables define standard contract terms. The time components within term definitions often rely on the mappings provided by OKC_TIME_CODE_UNITS_B to interpret durations.