Search Results update_last_service_reading_wo




Overview

CSI_COUNTER_READINGS_PUB is the public PL/SQL API package within the Oracle E-Business Suite Enterprise Asset Management (EAM) and Enterprise Installation Standards (CSI) product family responsible for capturing, validating, and updating counter readings against assets, meters, and configuration counters. Counters in EBS represent cumulative measures such as odometer readings, run hours, cycle counts, or production quantities used to drive preventive maintenance scheduling, warranty tracking, and usage-based service triggers. This package encapsulates the business logic that validates incoming counter reading transactions, derives associated counter property readings, resolves default properties, and persists the resulting data to the CSI schema. It is classified as a PUB (public) API, meaning it is intended for invocation by external callers, including Oracle forms, concurrent programs, and customer extensions, rather than being an internal-only implementation unit. The package body source header (csipcrdb.pls, version 120.6, 2011/12/20) confirms its use in both the 12.1.1 and 12.2.2 release streams, and its reference by six other packages reflects its role as a foundational integration point for counter data across the EAM and Service modules.

Key Procedures and Functions

Two public procedures are documented for this package.

  • CAPTURE_COUNTER_READING — The primary entry point for recording new counter readings. It accepts API-standard parameters (API version, commit flag, initialization message list flag, validation level) alongside three IN OUT NOCOPY array structures: the transaction table, the counter readings table, and the counter property readings table. It returns the standard x_return_status, x_msg_count, and x_msg_data values. Internally the procedure resolves default counter properties, derives additional counter readings, and evaluates relationship types such as FORMULA and CONFIGURATION to compute dependent values before commit. A bug fix (12536426) added reading type handling within this procedure.
  • UPDATE_COUNTER_READING — Provides the corresponding modification path, allowing callers to amend existing counter reading records. This is the procedure most closely associated with the search term "update_last_service_reading_wo," which typically refers to workflows that update the last service reading recorded against a work order by correcting or adjusting a previously captured counter value.

Tables Accessed

The package operates across the core CSI counter data model via APPS synonyms:

  • CSI_COUNTERS_B — Counter definitions master, read to validate that the counter being updated exists and to retrieve counter attributes.
  • CSI_COUNTER_PROPERTIES_B — Counter property definitions used to resolve default property readings.
  • CSI_COUNTER_READINGS — The primary transaction table where captured and updated reading values are inserted or modified.
  • CSI_COUNTER_RELATIONSHIPS — Defines relationships (e.g., FORMULA, CONFIGURATION) between counters, used to derive dependent counter readings.
  • CSI_CTR_PROPERTY_READINGS — Stores property-level readings associated with each counter reading.
  • PLITBLM — The standard EBS message table used by the API message stack for returning errors and warnings to callers.

Usage Notes

This public API is normally invoked rather than called directly from ad hoc SQL. Typical callers include Oracle EAM and Service forms that register meter and counter readings, concurrent programs performing bulk counter imports, and custom PL/SQL extensions that integrate external metering or telemetry systems. Because the procedures use IN OUT NOCOPY table structures for both input and output, callers must initialize the transaction, counter readings, and property readings collections, invoke the procedure with p_commit and p_init_msg_list set appropriately, then inspect x_return_status and drain the message stack using FND_MSG_PUB before proceeding. When the objective is to correct the last service reading associated with a work order — as suggested by the search term update_last_service_reading_wo — the caller should stage the amended record through UPDATE_COUNTER_READING so that validation, derived property updates, and relationship recalculations occur consistently with the original capture path. Direct DML against CSI_COUNTER_READINGS should be avoided, as it bypasses the derivation and validation logic this package enforces.