Search Results prev_counter_reading




Overview

The CSI_COUNTER_READINGS_BCV_V view is a backward-compatible database object owned by the APPS schema in Oracle E-Business Suite, delivered within the CSI – Install Base product family. Its stated purpose is to expose the same result set as the newer CS_CTR_COUNTER_VALUES_V view under the legacy naming convention, so that pre-existing reports, concurrent programs, forms, and integrations that were coded against the earlier interface continue to function after upgrade to EBS 12.1.1 or 12.2.2. The "BCV" suffix denotes "Backward Compatible View," a convention Oracle applies when a physical object is renamed or restructured while a stable read-only interface must be preserved.

Functionally, the view presents counter readings captured against counters defined in the Install Base (CSI) module. Each row represents a single reading event tied to a counter value record, enriched with the counter definition, unit of measure, tolerance thresholds, rollover behaviour, adjustment metadata, and the source transaction that produced the reading. This makes it the primary reporting surface for meter, gauge, and usage-counter data associated with customer assets and service contracts.

Underlying Base Objects

The view is constructed over the following documented objects, all resolved through APPS synonyms or local views:

  • CSI_COUNTER_READINGS (synonym) — supplies the transactional reading rows: value timestamp, counter reading, net reading, reset mode and reason, adjustment type and reading, and the standard WHO/attribute columns.
  • CSI_COUNTERS_BC_V (view) — the counter definition layer, providing counter group, counter name and description, initial reading, UOM, tolerance plus/minus, type, and rollover first/last reading values.
  • CSI_TRANSACTIONS (synonym) — joined to retrieve SOURCE_HEADER_REF_ID, the identifier of the originating transaction.
  • CSI_TXN_TYPES (synonym) — decoded to translate the numeric transaction type into a readable source transaction code.
  • CSI_LOOKUPS (view) — used to resolve the adjustment type into a descriptive meaning.
  • CSI_COUNTER_READINGS_PVT (package) — invoked at query time through two functions, GET_READING_BEFORE_RESET and GET_PREVIOUS_NET_READING, to derive prior counter and net readings for the same counter and timestamp.

Key Columns

Common Use Cases and Queries

Typical scenarios include usage-based billing reconciliation, service contract consumption tracking, and counter-tolerance exception reporting. Because the source transaction code explicitly identifies readings originating from a contract line, the view is frequently queried when reconciling contract entitlements against recorded meter values.

  • Reading history for a counter: SELECT counter_id, value_timestamp, counter_reading, net_reading FROM csi_counter_readings_bcv_v WHERE counter_id = :p_counter ORDER BY value_timestamp DESC;
  • Contract-line-sourced readings: SELECT source_transaction_id, counter_name, misc_reading FROM csi_counter_readings_bcv_v WHERE source_transaction_code = 'CONTRACT_LINE';
  • Usage delta calculation: SELECT counter_id, value_timestamp, net_reading - prev_net_reading usage_delta FROM csi_counter_readings_bcv_v WHERE value_timestamp BETWEEN :p_from AND :p_to;

Queries should be executed with the APPS schema context or a suitably granted reporting responsibility, and joins to contract or install base tables should use the exposed surrogate keys rather than hard-coded IDs.