SAP Function BAPI_MTRREADDOC_UPLOAD - Upload Meter Reading Results

Parameter Reference Type Length Default Optional Text
X_AUTHORITY_MTREAD_CHECK KENNZX C 1 SPACE X Indicator: Execute Authorization Check
X_USE_OPEN_LOG KENNZX C 1 SPACE X Indicator: Use Open Log for Messages

Parameter Reference Length Optional Text
EOSBUPLOADDATA BAPIOSBDATA 221 X On-site Billing: Upload Data
EXTENSIONIN BAPIPAREX 990 X
METEREADINGRESCHANGE BAPIEABLUCHANGE 232 X BAPI Upload Structure for MR Document
METERREADINGRESULTS BAPIEABLU 232 X Table of Uploaded Meter Reading Results
METERREADINGRESUPDATE BAPIEABLUUPDATE 232 X BAPI Upload Structure for Meter Reading Document (Update)
RETURN BAPIRETURN1 470 X Table of Return Parameters (Code, Text)

Functionality
This BAPI imports the meter reading results and additional informationfrom one of the following three tables of meter reading results into theIS-U/CCS system:

  • METERREADINGRESULTS

  • METEREADINGRESCHANGE

  • METERREADINGRESUPDATE

  • For a description of the individual table fields, refer to thedocumentation for the parameter.
    In order to process an uploaded record, a meter reading or a meterreading note must exist.
    To start uploading meter reading results, one of the three parametersmust be filled.
    The three processes are:
    • Enter meter reading results

    • The parameter or table METERREADINGRESULTS contains the uploaded recordsof the meter reading results to be entered.
      • Change Meter Reading Results

      • The parameter or table METERREADINGRESULTS contains the uploadedrecords of the meter reading results to be changed.
        • Update Meter Reading Results

        • The parameter or table METERREADINGRESUPDATE contains the uploadedrecords of the meter reading results to be updated or the meter readingresults to be entered and changed.

          Enter meter reading results
          There are two processing scenarios:
          A corresponding meter reading order exists for theuploaded meter reading result. In this case, the result was previouslydownloaded to an external system. The records uploaded from this systemcontain the internal ID of the meter reading order. The Material,
          Serial Number, Register, and Meter Reading Reasonfields can be ignored.
          No corresponding meter reading order exists for the uploadedmeter reading result.
          In this case, the key fields for one of the following alternatives mustbe maintained:
          Serial Number, Register, Meter Reading Date
          If the serial number is not unique in the system, a material must alsobe entered.
          Serial Number, Register, Meter Reading Date
          If the serial number is not unique in the system, a material numbermust also be entered.
          Point of Delivery, Register, Meter Reading Date
          RESET N1
          INCLUDE ISU_JBP OBJECT DOKU ID TX
          If no meter reading order exists for the uploaded meter reading result,in addition to the key fields described above, you also have to enterdata in the meter reading time (MRTIMEFORBILLING) field: Allmeter reading results of an installation with the same meter readingreason must be entered at the same time.
          An upload without previously creating a meter reading order is onlypossible for the following meter reading reasons:

          • 01 Periodic meter reading

          • An order creation for meter reading reason Periodic is onlypossible if a corresponding schedule record can be determined. InCustomizing for Meter Reading under Basic Settings -> DefineControl Parameters for Meter Reading Data Processing in the
            Interval for MR Order Creation During Upload of Periodic Resultsfield, you can enter an interval to determine the relevant schedulerecord based on the meter reading date.
            You can also enter the planned meter reading date. The interval is nottaken into in this case. The corresponding schedule record is accesseddirectly.
            • 08 Meter reading upon technical installation

            • Meter reading results for technical installation can be uploaded outsideof the installation transaction. These meter readings are then added oninstallation.
              • 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 thesystem.
                There are two processing scenarios:
                A corresponding meter reading document with a meter reading resultexists 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
                Auxilliary Date fields can be ignored.
                A corresponding meter reading document with a meter reading resultexists for the uploaded result. The internal ID of the meter readingdocument is not known and the uploaded records do not contain the ID.In this case, the key fields of one of the following alternatives mustbe 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 alsobe entered.
                Serial Number, Register Code, Meter Reading Date, Auxilliary Date
                If the serial number is not unique in the system, a material numbermust also be entered.
                Point of Delivery, Register Code, Meter Reading Date, Auxilliary Date
                RESET N1
                The auxiliary date for background processing (MRDATEFORIDENTIF) must bespecified in order to identify the meter reading result to be changed.This date corresponds with the meter reading date of the meter readingresult to be changed before processing.
                If no meter reading result to be changed can be identified during theupload process, the meter reading data of the uploaded record is notimported into the system.
                INCLUDE ISU_JBP OBJECT DOKU ID TX
                - The meter reading time cannot be changed by the upload process.
                If the meter reading data for the installation meter readings (MRreasons 21, 08, 24) is not uploaded using the internal ID of the meterreading document, the information on the meter reading reason must bespecified in the uploaded record.

                Update Meter Reading Results
                The uploaded record can either change the existing meter reading resultin the system or it can generate/enter a new meter reading result. Thisprocess is a combination of the two previous processes.
                There are three processing scenarios:
                A corresponding meter reading document with a meter reading result or ameter reading order exists for the uploaded result. The uploaded recordscontain the internal ID of the meter reading document. The
                Material, Serial Number, Register, Meter ReadingReason and Auxiliary Date fields can be ignored. The uploadedrecord changes the existing meter reading result or creates a new resultin the system.
                A corresponding meter reading document with a meter reading resultexists for the uploaded result. The internal ID of the meterreading document is not known and the uploaded records do not containthe ID. In this case, the key fields of one of the followingalternatives must be maintained to identify the meter reading documentto be changed:
                Serial Number, Register, Meter Reading Date, Auxilliary Date
                If the serial number is not unique in the system, a material must alsobe entered.
                Serial Number, Register Code, Meter Reading Date, Auxilliary Date
                If the serial number is not unique in the system, a material numbermust also be entered.
                Point of Delivery, Register Code, Meter Reading Date, Auxiliary Date
                The auxiliary date for background processing (MRDATEFORIDENTIF) must bespecified in order to identify the meter reading result to be changed.This date corresponds with the meter reading date of the meter readingresult to be changed before processing.
                INCLUDE ISU_JBP OBJECT DOKU ID TX
                - The meter reading time cannot be changed by the upload process.
                If the meter reading data for the installation meter readings (MRreasons 21, 08, 24) is not uploaded using the internal ID of the meterreading document, the information on the meter reading reason must bespecified in the uploaded record.
                If no meter reading result to be changed can be identified during theupload process, a meter reading order is identified for the uploadedresult or in no meter reading order exists, a meter reading document isgenerated and the meter reading result is entered in the system.
                No corresponding meter reading order exists for the uploadedmeter reading result.
                In this case, the key fields for one of the following alternatives mustbe maintained:
                Serial Number, Register, Meter Reading Date
                If the serial number is not unique in the system, a material must alsobe entered.
                Serial Number, Register, Meter Reading Date
                If the serial number is not unique in the system, a material numbermust also be entered.
                Point of Delivery, Register, Meter Reading Date
                INCLUDE ISU_JBP OBJECT DOKU ID TX
                If no meter reading order exists for the uploaded meter reading result,you also have to enter data in the meter reading time(MRTIMEFORBILLING) field in additional to the key fields describedabove: All meter reading results of an installation with the same meterreading reason must be entered at the same time.

                Upload Customer-Specific Fields
                You have the option to upload customer-specific fields (also seecustomer enhancement EDMMR001) using table EXTENSIONIN. The custome
                r-specific data is not uploaded along with the standard data but in aseparate table, which has the following structure:

                • Structure

                • Valuepart1 + Valuepart2 + Valuepart3 + Valuepart4

                • The valueparts consist of strings of 128 characters. The key data andcustomer-specific data is stored there. You enter the structure in thestructure field. (If you use a BAPI to upload meter reading results,there is only one segment and therefore one structure). The structure isBAPI_TE_EABL.
                  Structure BAPI_TE_EABL contains the following fields:
                  • MATERIAL

                  • SERIALNO

                  • Register

                  • Meter Reading Reason

                  • Meter Reading Date

                  • Meter Reading Document Number

                  • Register Code

                  • Point of Delivery ID

                  • INCLUDE CI_EABL
                  • Notes
                    Messages are returned in the RETURN parameter.

                    Description
                    This table contains all meter reading results and additional informationthat are to be changed in IS-U/CCS.
                    The table contains the following fields:

                    • Material (MATERIAL)

                    • Serial Number (SERIALNO)

                    • Register (REGISTER)

                    • Meter Reading Reason (MRREASON)

                    • ID Number of Meter Reading Document (MRIDNUMBER)

                    • Meter Reading Result (READINGRESULT)

                    • Meter Reading Note from Meter Reader (METERREADINGNOTE)

                    • User-Specific Meter Reading Type (ACTUALCUSTOMERMRTYPE)

                    • Number of Meter Reader (METERREADER)

                    • Billing-Related Meter Reading Date (MRDATEFORBILLING)

                    • Billing-Related Meter Reading Time (MRTIMEFORBILLING)

                    • Date of Actual Meter Reading (ACTUALMRDATE)

                    • Time of Actual Meter Reading (ACTUALMRTIME)

                    • Date Maximum Occurred (MRDATEOFMAXIMUM)

                    • Time Maximum Occurred (MRTIMEOFMAXIMUM)

                    • Order Number of Service Management (SMORDER)

                    • Meter Reading Result Active (ACTIVE)

                    • Code for Identificaiton of a Register (REFNUMBER)

                    • Scheduled Meter Reading Date (TARGETMRDATE)

                    • Point of Delivery ID (EXT_UI)

                    • Auxiliary Date for Identification of Meter Reading Result to Be Changed
                    • (MRDATEFORIDENTIF)
                      The date and time of the actual meter reading have statisticalcharacters. For example, these fields are maintained if a device cansave multiple meter reading results on different dates, and outputsthese results when the meter reading is executed.
                      The date and time, at which the maximum occurs, are used for billing forservices. In this way, a peak value or middle value can be determinedfrom the different services.
                      You must enter an auxiliary date for identifying the meter readingresult to be changed, if the ID number of the meter reading result to bechanged is not known.
                      For more information on the individual fields, see the documentation forthe function module.

                      Description
                      This table contains all meter reading results and additionalinformation to be imported into the IS-U/CCS system.
                      The table includes the following fields:

                      • Material (MATERIAL)

                      • Serial number (SERIALNO)

                      • Register (REGISTER)

                      • Meter reading reason (MRREASON)

                      • Internal number for identifying meter reading document (MRIDNUMBER)

                      • Meter reading taken(READINGRESULT)

                      • Note from the meter reader (METERREADINGNOTE)

                      • User-defined meter reading type (ACTUALCUSTOMERMRTYPE)

                      • Meter reader number (METERREADER)

                      • Meter reading date relevant to billing (MRDATEFORBILLING)

                      • Meter reading time relevant to billing (MRTIMEFORBILLING)

                      • Date of actual meter reading (ACTUALMRDATE)

                      • Time of day of actual meter reading (ACTUALMRTIME)

                      • Date of maximum meter reading (MRDATEOFMAXIMUM)

                      • Time of maximum meter reading (MRTIMEOFMAXIMUM)

                      • SM order number (SMORDER)

                      • The fields for the date and time of day of the actual meter reading arestatistical. These fields are maintained if, for example, a device canstore several meter readings for different dates and output thereadings at the time of meter reading.
                        The fields for the date and time of day of the maximum reading are usedfor billing demand. You can calculate peaks and averages using severaldemand readings.
                        You can find more information about individual fields in thedocumentation of the relevant function module.

                        Description
                        This table contains all meter reading results and additional informationthat are to be entered or changed in IS-U/CCS.
                        The table contains the following fields:

                        • Material (MATERIAL)

                        • Serial Number (SERIALNO)

                        • Register (REGISTER)

                        • Meter Reading Reason (MRREASON)

                        • ID Number of Meter Reading Document (MRIDNUMBER)

                        • Meter Reading Result (READINGRESULT)

                        • Meter Reading Note from Meter Reader (METERREADINGNOTE)

                        • User-Specific Meter Reading Type (ACTUALCUSTOMERMRTYPE)

                        • Number of Meter Reader (METERREADER)

                        • Billing-Related Meter Reading Date (MRDATEFORBILLING)

                        • Billing-Related Meter Reading Time (MRTIMEFORBILLING

                        • Date of Actual Meter Reading (ACTUALMRDATE)

                        • Time of Actual Meter Reading (ACTUALMRTIME)

                        • Date Maximum Occurred (MRDATEOFMAXIMUM)

                        • Time Maximum Occurred (MRTIMEOFMAXIMUM)

                        • Order Number of Service Management (SMORDER)

                        • Meter Reading Result Active (ACTIVE)

                        • Code for Identification of Register (REFNUMBER)

                        • Scheduled Meter Reading Date (TARGETMRDATE)

                        • Point of Delivery ID (EXT_UI)

                        • Auxiliary Date for Identification of Meter Reading Result to Be Changed
                        • (MRDATEFORIDENTIF)
                          The date and time of the actual meter reading have statisticalcharacter. For example, these fields are maintained if a device can savemultiple meter readings for different dates, and outputs these meterreadings when the meter reading is executed.
                          The date and time, at which the maximum occurs, are used for billingservices. In this way, a peak value or a middle value can be determinedfrom different services.
                          You must enter an auxiliary date for identifying the meter readingresult to be changed, if the ID number of this result is not known.
                          For more information on the individual fields, see the documentation forthe function module.

                          Description
                          The structure may contain the following information if an error occurs:

                          • Message type (TYPE field)

                          • Message code (CODE field)

                          • Message text (MESSAGE field)

                          • The structure remains empty if no errors occur.

                            Value range

                            Type ID Number Explanation
                            E E9 011 Material & does not exist
                            E E9 011 Serial number & does not exist
                            E E9 011 Meter reading document & does not exist
                            E E9 011 Meter reading reason & does not exist
                            E E9 080 Enter the serial number, register number and meter
                            reading date
                            E E9 080 Specify material and serial number
                            E EG 094 Device/serial number & is not from device category/
                            material &
                            E EG 053 More than one device was found with the data entered
                            E EL 004 Meter reading document & does not have status
                            "prepared"
                            A E9 887 Internal error: unexpected exception & when calling
                            function module MSG_OPEN, MSG_ACTION, MSG_PREPARE_CLOSE
                            or MSG_CLOSE
                            S EL 250 & meter reading results have been imported into
                            system

1374262Termination 55 504 when customer method used for device inst
1042766No interval check for BAPI_MTRREADDOC_UPLOAD
1022078Termination 00 564 in transaction EL32 (and others)