My Oracle Support Banner

Why EAM Meter Reading API Does Not Import Meter Readings Using EAM_MeterReading_Pub.Create_Meter_Reading ? (Doc ID 551744.1)

Last updated on JULY 14, 2020

Applies to:

Oracle Contracts - Version 12.0 to 12.0 [Release 12]
Oracle Installed Base - Version 12.0.0 and later
Information in this document applies to any platform.

Symptoms

There are 2 scenarios where this problem may occur:

1. EAM Meter reading API (EAM_MeterReading_PUB.create_meter_reading) is not importing meter readings.

2. User enters meter reading from application GUI.

The return status is success but the data is not imported.

Below is a sample test script used for the meter reading import. This may vary based on user requirements

=============================================

DECLARE
l_meter_reading_id NUMBER;
 l_msg_count NUMBER;
 l_msg_data VARCHAR2(4000);
 x_errmsg VARCHAR2(4000);
 l_return_status VARCHAR2(1000);
 l_value_before_reset NUMBER;
 l_meter_reading_rec eam_meterreading_pub.meter_reading_rec_type;
 BEGIN
 l_meter_reading_rec.meter_id := 561;
 l_meter_reading_rec.current_reading := 2000;
 l_meter_reading_rec.current_reading_date := SYSDATE;
 l_meter_reading_rec.reset_flag := 'N';
 l_meter_reading_rec.attribute15 := 'TESTING';
 eam_meterreading_pub.create_meter_reading(
 p_api_version =>1.0,
 p_commit=>FND_API.G_FALSE,
 p_meter_reading_rec=>l_meter_reading_rec,
 x_msg_count=>l_msg_count,
 x_msg_data => l_msg_data,
 x_return_status=>l_return_status,
 x_meter_reading_id=>l_meter_reading_id);
 Dbms_Output.put_line('l_return_status:'||l_return_status);
 Dbms_Output.put_line('l_meter_reading_id:'||l_meter_reading_id);
 Dbms_Output.put_line('l_msg_count:'||l_msg_count);
 IF(l_return_status!='S') THEN
 FOR i IN 1..l_msg_count LOOP
 x_errmsg := fnd_msg_pub.get(i, 'F');
 Dbms_Output.put_line(i||':'||x_errmsg);
 END LOOP;
 END IF;
 Dbms_Output.put_line('l_msg_data:'||l_msg_data);
 COMMIT;
 END;
 /

==================================================

The issue may occur always for all meters and in all EAM Organizations.


Error Message:

ORA-01086: savepoint 'CREATE_METER_READING_PUB' never established
ORA-06512: at "APPS.EAM_METERREADING_PUB", line 371
ORA-01086: savepoint 'CAPTURE_COUNTER_READING' never established
ORA-06512: at "APPS.CSI_COUNTER_READINGS_PUB", line 721
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at line 28

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.