Search Results has_mandatory_meter_reading




Overview

APPS.EAM_METER_READINGS_JSP is a PL/SQL package declared with AUTHID CURRENT_USER that serves as the backend API for JavaServer Page (JSP) interfaces handling Enterprise Asset Management (EAM) meter readings in Oracle E-Business Suite. The package header identifies its purpose explicitly as an "API for JSP pages to call to add meter reading." In release 12.1.1 and 12.2.2, this package bridges the self-service HTML layer with the underlying EAM meter data model, allowing users to record asset meter readings, and to determine whether scheduled maintenance work orders carry mandatory meter reading requirements before completion is permitted.

The package encapsulates business validation logic—most notably the determination of whether a work order has mandatory meter readings—so that the JSP layer need not query EAM and Work in Process tables directly. It also captures standard "Who" columns via FND_GLOBAL at the session level, including user ID, login ID, concurrent request ID, and program identifiers, ensuring audit columns are populated consistently on inserts.

Key Procedures and Functions

  • HAS_MANDATORY_METER_READING — Wrapper function that returns 'Yes' or 'No' indicating whether a given work order (identified by WIP entity) has mandatory meter readings. This is the object most commonly referenced in customizations and is the target of the search term "has_mandatory_meter_reading."
  • IS_METER_READING_MANDATORY — Function that determines whether a specific meter on a specific work order is mandatory, refining the work-order-level check to the individual meter level.
  • GET_LATEST_METER_READING_ID — Function returning the meter reading identifier of the most recent reading recorded for a given meter, used to establish a baseline for subsequent readings.
  • INSERT_ROW — Procedure that inserts a meter reading row into the EAM meter readings table, accepting the meter, current reading value and date, reset flag, life-to-date reading, work order reference, and description.
  • GET_CURRENT_READING_DATA — Retrieves current reading information for display or validation within the JSP flow.
  • CHECK_ASSET_METER_ASSOCIATION — Validates that a meter is properly associated with the asset in question before a reading is accepted.
  • GET_ADJACENT_READING — Returns the preceding or neighbouring reading for a meter, supporting trend display and validation of entered values.
  • ADD_METER_READING — Higher-level procedure that orchestrates the addition of a meter reading, typically invoking validation and insert logic together.

Tables Accessed

The package operates against the following tables through APPS synonyms:

  • EAM_METERS — Meter definitions; consulted to validate meter existence and mandatory flags.
  • EAM_METER_READINGS — The primary transactional table into which readings are inserted and from which current and adjacent readings are queried.
  • EAM_METER_READINGS_S — The shadow table supporting multi-organization or audit requirements associated with meter readings.
  • WIP_DISCRETE_JOBS — Work order header data used to resolve the WIP entity and evaluate whether mandatory meter readings apply.
  • DUAL — Used for singleton evaluations, such as normalising Yes/No results.

Usage Notes

This package is invoked exclusively from the EAM self-service JSP layer rather than from Oracle Forms or concurrent programs; the ETRM metadata records zero dependent packages. Customers extending EAM meter functionality—for example, embedding reading capture into custom OAF pages or validating work order completion—may call HAS_MANDATORY_METER_READING and IS_METER_READING_MANDATORY directly. Because the package executes with AUTHID CURRENT_USER, the calling schema requires appropriate privileges on the underlying EAM and WIP objects. The header dates to release 11.5, and the code remains functionally stable through 12.2.2.