Results for “okl_usage”
22 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
APPS.OKL_BPD_CNTR_READING_UV is a reporting view within the Oracle E-Business Suite Enterprise Contracts / Lease and Finance Management (OKL, formerly OKX) schema. It presents counter readings for leased or financed assets in the context of their contract, contract line, and counter group. The view's name, combining "BPD" (Business Process Data), "CNTR" (Counter), and "READING", indicates its role as a denormalized, read-only projection that flattens several normalized contract, asset, and counter structures into a single flat record set suitable for concurrent program extracts, OBIEE/BIP reports, and inter-module integration.
Because the view is owned by APPS and references synonyms, it is intended for cross-schema access from custom code, personalizations, and reporting layers. In 12.1.1 and 12.2.2 the structure is materially the same; any differences are limited to underlying OKC/OKL object versions rather than the view's contract.
Underlying Base Objects
The view is defined over a mixed set of base tables and other views. Documented referenced objects are:
- OKL_CNTR_LVLNG_GRPS_V — the counter group header (provides ID, NAME, effective dates).
- OKL_CNTR_LVLNG_LNS_V — counter group lines linking a counter group to individual counters.
- CS_COUNTERS — the counter master (COUNTER_ID, NAME, TYPE, UOM_CODE).
- MTL_UNITS_OF_MEASURE_TL — UOM description in the session language.
- OKC_K_HEADERS_B — the contract header (CONTRACT_NUMBER).
- OKC_K_LINES_B — contract lines (usage line, OKS line, asset line, etc.).
- OKC_K_ITEMS — item relationships with JTOT_OBJECT1_CODE discriminating among 'OKL_USAGE', 'OKX_COVASST', 'OKX_COUNTER'.
- OKC_K_LINES_TL — language-translated line names, filtered by USERENV('LANG').
- OKX_ASSETS_V — the covered asset (ASSET_NUMBER, SERIAL_NUMBER, DESCRIPTION).
The join path requires that a counter group (OKL_CNTR_LVLNG_GRPS_V) is joined to its lines, each line pointing to a CS_COUNTERS row, and that the counter is attached to the asset via OKC_K_ITEMS with JTOT_OBJECT1_CODE = 'OKX_COUNTER'. The asset is joined back to the usage line via 'OKX_COVASST'. Consequently, both counters and assets must be present on the contract for a row to appear.
Key Columns
- ID — counter group ID (CNTR_LVLNG.ID).
- COUNTER_GROUP — name of the counter group.
- COUNTER_NUMBER / COUNTER_NAME / COUNTER_TYPE — the counter identity and type from CS_COUNTERS.
- CONTRACT_NUMBER — contract header number.
- ASSET_NUMBER / ASSET_SERIAL_NUMBER / ASSET_DESCRIPTION — the covered asset details.
- UNIT_OF_MEASURE — the reading UOM in the session language.
- EFFECTIVE_DATE_FROM / EFFECTIVE_DATE_TO — validity window of the counter group.
- NULL, NULL, NULL — three unnamed placeholder columns, typically reserved for future reading value, reading date, and source columns. In 12.x they remain unpopulated.
Common Use Cases and Queries
Typical uses include extracting all counters associated with a contract's covered assets, validating that a counter is properly attached to an asset before recording a reading, and driving list of values for counter entry forms. A representative query:
- List counters for a contract:
SELECT CONTRACT_NUMBER, COUNTER_GROUP, COUNTER_NAME, COUNTER_TYPE, ASSET_NUMBER, UNIT_OF_MEASURE FROM APPS.OKL_BPD_CNTR_READING_UV WHERE CONTRACT_NUMBER = :p_contract_no ORDER BY COUNTER_NAME; - Effective-date filter: add
AND TRUNC(SYSDATE) BETWEEN EFFECTIVE_DATE_FROM AND NVL(EFFECTIVE_DATE_TO, SYSDATE). - Counter type breakdown for a reporting dashboard: group by COUNTER_TYPE and COUNTER_GROUP.
Because the view excludes reading values, it is best used for structural reference (which counter belongs to which contract and asset) rather than for capturing numeric readings, which reside in the OKL reading tables.