Ansicht
Dokumentation

BAPI_MTRREADDOC_UPLOAD - Upload Meter Reading Results

BAPI_MTRREADDOC_UPLOAD - Upload Meter Reading Results

TXBHW - Original Tax Base Amount in Local Currency   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This BAPI imports the meter reading results and additional information from one of the following three tables of meter reading results into the IS-U/CCS system:

  • METERREADINGRESULTS
  • METEREADINGRESCHANGE
  • METERREADINGRESUPDATE

For a description of the individual table fields, see the documentation for the parameter.

In order to process an uploaded record, a meter reading or a meter reading note must exist.

To start uploading meter reading results, one of the three parameters must be filled.

There are three different processes:

  • Enter Meter Reading Results
The parameter or table METERREADINGRESULTS contains the uploaded records of the meter reading results to be entered.
  • Change meter reading results
The parameter or table METERREADINGRESULTS contains the uploaded records of the meter reading results to be changed.
  • Update Meter Reading Results
The parameter or table METERREADINGRESUPDATE contains the uploaded records of the meter reading results to be updated or the meter reading results to be entered and changed.

Enter Meter Reading Results

There are two processing scenarios:

  1. A corresponding meter reading order exists for the uploaded meter reading result. In this case, the result was previously downloaded to an external system. The records uploaded from this system contain the internal ID of the meter reading order. The Material, Serial Number, Register, and Meter Reading Reason fields can be ignored.
  2. No meter reading order exists for the uploaded meter reading result.
In this case, the key fields for one of the following alternatives must be filled:
  • Serial Number, Register, Meter Reading Date

If the serial number is not unique in the system, a material must also be provided.
  • Serial Number, Register, Meter Reading Date

If the serial number is not unique in the system, a material number must also be provided.
  • Point of Delivery, Register, Meter Reading Date

If no meter reading order exists for the uploaded meter reading result, you have to enter data in the meter reading time (MRTIMEFORBILLING) field in addition to the key fields described above. All meter reading results of an installation with the same meter reading reason must be entered at the same time.

An upload without previously creating a meter reading order is only possible for the following meter reading reasons:

  • 01 Periodic meter reading
An order creation for meter reading reason Periodic is only possible if a corresponding schedule record can be determined. In Customizing for Meter Reading under Basic Settings -> Define Control Parameters for Meter Reading Data Processing in the Interval for MR Order Creation During Upload of Periodic Results field, you can enter an interval to determine the relevant schedule record based on the meter reading date.
You can also enter the planned meter reading date. The interval is not taken into account in this case. The corresponding schedule record is accessed directly.
  • 08 Meter reading upon technical installation
Meter reading results for technical installation can be uploaded outside of the installation transaction. These meter readings are then added when installation takes place.
  • 09 Interim meter reading without billing
  • 13 Meter reading on disconnection of installation
  • 18 Meter reading on reconnection
  • 19 Delivery meter reading
  • 02 Interim meter reading with billing

Change Meter Reading Results

The uploaded record changes the existing meter reading results in the system.

There are two processing scenarios:

  1. A corresponding meter reading document with a meter reading result exists for the uploaded result. The uploaded records contain the internal ID of the meter reading document. The Material, Serial Number, Register, Meter Reading Reason, and Auxiliary Date fields can be ignored.
  2. A corresponding meter reading document with a meter reading result exists for the uploaded result. The internal ID of the meter reading document is not known and the uploaded records do not contain the ID. In this case, the key fields of one of the following alternatives must be maintained to identify the meter reading document to be changed:
  • Serial Number, Register, Meter Reading Date, Auxilliary Date

If the serial number is not unique in the system, a material must also be provided.
  • Serial Number, Register Code, Meter Reading Date, Auxilliary Date

If the serial number is not unique in the system, a material number must also be provided.
  • Point of Delivery, Register Code, Meter Reading Date, Auxilliary Date

The auxiliary date for background processing (MRDATEFORIDENTIF) must be specified in order to identify the meter reading result to be changed. This date corresponds with the meter reading date of the meter reading result to be changed before processing.

If no meter reading result to be changed can be identified during the upload process, the meter reading data of the uploaded record is not imported into the system.

- The meter reading time cannot be changed by the upload process.
- If the meter reading data for the installation meter readings (MR reasons 21, 08, 24) is not uploaded using the internal ID of the meter reading document, the information on the meter reading reason must be specified in the uploaded record.

Update Meter Reading Results

The uploaded record can either change the existing meter reading result in the system or it can generate/enter a new meter reading result. This process is a combination of the two previous processes.

There are three different processing scenarios:

  1. A corresponding meter reading document with a meter reading result or a meter reading order exists for the uploaded result. The uploaded records contain the internal ID of the meter reading document. The Material, Serial Number, Register, Meter Reading Reason, and Auxiliary Date fields can be ignored. The uploaded record changes the existing meter reading result or creates a new result in the system.
  2. A corresponding meter reading document with a meter reading result exists for the uploaded result. The internal ID of the meter reading document is not known and the uploaded records do not contain the ID. In this case, the key fields of one of the following alternatives must be maintained to identify the meter reading document to be changed:
  • Serial Number, Register, Meter Reading Date, Auxilliary Date

If the serial number is not unique in the system, a material must also be provided.
  • Serial Number, Register Code, Meter Reading Date, Auxilliary Date

If the serial number is not unique in the system, a material number must also be provided.
  • Point of Delivery, Register Code, Meter Reading Date, Auxiliary Date

The auxiliary date for background processing (MRDATEFORIDENTIF) must be specified in order to identify the meter reading result to be changed. This date corresponds with the meter reading date of the meter reading result to be changed before processing.
- The meter reading time cannot be changed by the upload process.
- If the meter reading data for the installation meter readings (MR reasons 21, 08, 24) is not uploaded using the internal ID of the meter reading document, the information on the meter reading reason must be specified in the uploaded record.

If no meter reading result to be changed can be identified during the upload process, a meter reading order is identified for the uploaded result or in no meter reading order exists, a meter reading document is generated and the meter reading result is entered in the system.

  1. No meter reading order exists for the uploaded meter reading result.
In this case, the key fields for one of the following alternatives must be filled:
  • Serial Number, Register, Meter Reading Date

If the serial number is not unique in the system, a material must also be provided.
  • Serial Number, Register, Meter Reading Date

If the serial number is not unique in the system, a material number must also be provided.
  • Point of Delivery, Register, Meter Reading Date

If no meter reading order exists for the uploaded meter reading result, you have to enter data in the meter reading time (MRTIMEFORBILLING) field in addition to the key fields described above. All meter reading results of an installation with the same meter reading reason must be entered at the same time.

Upload Customer-Specific Fields

it is possible to upload customer-specific fields (also see customer enhancement EDMMR001). The table EXTENSIONIN is used for this purpose. The customer-specific data is not uploaded with the standard data, but in a separate table. The table has the following structure:

  • Structure
  • Valuepart1 + Valuepart2 + Valuepart3 + Valuepart4

The valueparts consist of strings of 128 characters. The key data and customer-specific data is stored there. You enter the structure in the structure field. (If you use a BAPI to upload meter reading results, there is only one segment and therefore one structure).

If you use the short material number with a maximum length of 18 digits, the structure is BAPI_TE_EABL.

Structure BAPI_TE_EABL contains the following fields:

  • Material number, 18 digits
  • Serial number
  • Register
  • Meter reading reason
  • Meter reading date
  • Meter reading document number
  • Register code
  • Point of delivery ID
  • INCLUDE CI_EABL

If you use the long material number with a maximum length of 40 digits, the structure is BAPI_TE_EABL2.

You can find more information about the material number extension in Customzing under Cross-Application Components -> General Application Functions -> Field Length Extension.

Structure BAPI_TE_EABL2 contains the following fields:

  • Long material number, 40 digits
  • Serial number
  • Register
  • Meter reading reason
  • Meter reading date
  • Meter reading document number
  • Code for register identification
  • Point of delivery ID
  • INCLUDE CI_EABL


Example

Notes

Messages are returned in the RETURN parameter.

Further information





Parameters

EDOC_BR_ISU_OSB
EOSBUPLOADDATA
EXTENSIONIN
METEREADINGRESCHANGE
METERREADINGRESULTS
METERREADINGRESUPDATE
RETURN
RETURN_AUX
RETURN_LOG
X_AUTHORITY_MTREAD_CHECK
X_USE_OPEN_LOG

Exceptions

Function Group

MTRREADDOC

BAL_S_LOG - Application Log: Log header data   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 14608 Date: 20240523 Time: 181522     sap01-206 ( 233 ms )