SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading MR result without meter reading orders - BAPI_MTRREADDOC_UPLOAD

marko_kunsic
Explorer
0 Kudos

I have a problem uploading MR result without meter reading orders with 'BAPI_MTRREADDOC_UPLOAD' with MR reason '01' - periodic meter reading.

The same procedure can be done without problem through EL28 (Execute single entry) with input values:

Device: xxxxxxx

MR type: 29

Scheduled MRD: last day of previous month

MR reason: 01

BAPI is filled only with table METERREADINGRESULTS:

SERIALNO = xxxxxxxx

REGISTER = xxx

MRREASON = 01

READINGRESULT = xxxxxxx

ACTUALCUSTOMERMRTYPE = 29

MRDATEFORBILLING = date

BAPI returns only one record with info message EL 393: '0 of 1 reading uploaded successfully'.

No other error message is returned to get hint what is wrong.

BAPI made successfully upload if field MRREASON is empty or '09'.

If MRREASON is empty, value '09' is also filled automatically.

Indicator UPLOAD_FLAG in table TE609 is set to 'X' for reason 01.

I've seen a lot of notes concerning issues with BAPI_MTRREADDOC_UPLOAD, but could not find the right solution.

Another observation:

if I first execute single entry in EL28 (with MR reason 01), then BAPI can successfully upload MR result for the same day.

Any hints, what could be wrong, would be greatly appreciated.

Thank you in advance.

Marko

2 REPLIES 2

william_eastman
Advisor
Advisor
0 Kudos

Marko:

Try method MeterDocCreate of object MTRREADDOC.

regards,

bill.

daniel_mccollum
Active Contributor
0 Kudos

Reading reason 01 - periodic meter reading requires that the schedule record exists for the date you are creating the reading result for.

For your master data in menu SISU

Assuming the schedule records are non-dynamic IE

TE420-TS_DYN = ' ' at the portion

Utilities Industry --> Scheduling --> Schedule Record

Transaction EA43 to generate for the date range required.

Assuming  the schedule records are dynamic

TE420-TS_DYN = '1' or  '2' at the portion

Utilities Industry --> Scheduling --> Dynamic Schedule Record

Transaction E1DY to generate for the date range & factory calendar required.