Work Order Completion API (EAM_PROCESS_WO_PUB) Won't Process Mandatory Meter Readings

(Doc ID 1603623.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle Enterprise Asset Management - Version 12.1.3 and later
Information in this document applies to any platform.

Goal

Work Order Completion API (EAM_PROCESS_WO_PUB) will not process Mandatory Meter Readings

Problem Description
---------------------------------------------------
When passing a meter reading using l_eam_meter_reading_rec as part of the call the EAM_PROCESS_WO_PUB to complete a work
order, We get stopped in EAM_METERREADING_VALIDATE_PVT.MANDATORY_ENTERED. We get an exception:

Exception FROM EAM_METERREADING_VALIDATE_PVT.MANDATORY_ENTERED()



As far as I can determine, the exception is due to the following select statement (@225 in the package body), which doesn't
return anything, because we have nothing in the CSI_COUNTER_RELATIONSHIPS table. :

----------------------------------------------------------------------------------------------------------------------------
GET THE SOURE METER OF THE MANDATORY METER

SELECT SOURCE_COUNTER_ID INTO L_SOURCE_METER_ID FROM CSI_COUNTER_RELATIONSHIPS WHERE OBJECT_COUNTER_ID =
MANDATORY_COUNTER_ID_TBL(J) AND SYSDATE BETWEEN NVL(ACTIVE_START_DATE(+), SYSDATE-1) AND NVL(ACTIVE_END_DATE(+), SYSDATE+1);

LOOP THROUGH P_EAM_METER_READING_TBL TO CHECK WHETHER READINGS ARE ENTERED OR NOT

FOR K IN P_EAM_METER_READING_TBL.FIRST..P_EAM_METER_READING_TBL.LAST LOOP

IF SOURCE METER ID IS NULL THEN COMPARE P_EAM_METER_READING_TBL(K)

----------------------------------------------------------------------------------------------------------------------------

Having recently upgraded from 11.5.10 to 12.1.3, I am not sure if the problem is that there should be records in the
CSI_COUNTER_RELATIONSHIPS table, or if the problem is there should be a validation that there is indeed a source meter
before it tries to select one.
 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms