SAP for Utilities Blogs
Discover insights and practical tips to optimize operations, reduce costs, and deliver reliable energy with SAP technology. Contribute your own blog post!
cancel
Showing results for 
Search instead for 
Did you mean: 
mohammedmuzammil
Participant
1,371

Background:

This is the second part of the series Interpolating the move-in meter reading in SAP IS-U Device Management . Here I would like to describe the technical fix required to achieve the interpolation of the move-in meter reading through the function module BAPI_MTRREADDOC_UPLOAD.

The config described in the article Interpolating the move-in meter reading in SAP IS-U Device Management correctly interpolates the move-in read while we enter a read through EL28 transaction in any read order which is at an interval defined in the field "Entry Interval" of the MRU assigned to the installation. However if we try to upload the meter reading through the function module BAPI_MTRREADDOC_UPLOAD for the same scenario the interpolation doesn't work!

Analysis:

The reason for the issue described in the Background section is that the function module BAPI_MTRREADDOC_UPLOAD retrieves the data records from EABL and EABLG tables at the beginning of its processing based on the meter read document ID ( EABL-ABLBELNR ) supplied through the tables interface parameter METERREADINGRESULTS. This is because of the fact that we can upload the meter reading for 600 read orders at once through this FM and the initial data retrieval is to minimize the performance issue. In the interpolation routine it refers to these data records and tries to identify a meter read order based on the search criteria created out of the interpolation config described in the article Interpolating the move-in meter reading in SAP IS-U Device Management  and fails to find any. Hence only the read orders supplied to the FM are fulfilled.


The interpolation concept works through EL28 transaction because it hits the EABL & EABLG tables directly during the interpolation routine based on the search criteria created out of the interpolation config and pulls the read order correctly which requires interpolation.


Solution:


The solution is to bypass the initial retrieval of the data records in the FM BAPI_MTRREADDOC_UPLOAD so that the interpolation routine may look to the EABL & EABLG tables during its processing. And the FM BAPI_MTRREADDOC_UPLOAD has the provision to achieve this. Below is the code to be written before calling the FM.



Hope this helps!