Fonction SAP BAPI_MTRREADDOC_GETLIST - Select meter reading orders and results

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CONTRACT BAPIEABLH-CONTRACT C 10 X Contract
CUSTOMER BAPIKNVVKY-CUSTOMER C 10 X Customer
INSTALLATION BAPIEABLG-INSTALLATION C 10 X Installation
MATERIAL BAPI_EQUI-MATERIAL C 18 X Material or device category
METERREADINGUNIT BAPIEABLG-METERREADINGUNIT C 8 X Meter reading unit
MRDATEFROM BAPIEABL-MRDATEFORBILLING D 8 X Meter reading date (lower interval limit)
MRDATETO BAPIEABL-MRDATEFORBILLING D 8 X Meter reading date (upper interval limit)
MRDOCUMENTTYPE BAPIEABLH-MRDOCUMENTTYPE C 1 MR document category
MRREASON BAPIEABLG-MRREASON C 2 X Meter reading reason
NO_REG_RELSHIP REGEN-KENNZX C 1 SPACE X Flag: No Register Relationships
PORTION BAPIEABLH-PORTION C 8 X Portion
REGISTER BAPIEABL-REGISTER N 3 X Register
SERIALNO BAPI_EQUI-SERIALNO C 18 X Serial number or device
TARGETMRDATEFROM BAPIEABL-TARGETMRDATE D 8 X Target meter reading date (lower interval limit)
TARGETMRDATETO BAPIEABL-TARGETMRDATE D 8 X Target meter reading date (upper interval limit)

Paramètre Reférence Type Long. Description
RETURN BAPIRETURN1 u 470 Structure for return parameters (code, text)

Paramètre Reférence Long. Facultatif Description
MRDOCUMENTDATA BAPIEABL 310 X Table of meter reading orders or results
MRDOCUMENTREASONS BAPIEABLG 49 X Table of meter reading reason allocations

Functionality
This method supplies a list of meter reading orders or results(MRDOCUMENTDATA) and meter reading reason allocations(MRDOCUMENTREASONS) according to different selection criteria.
Enter one of the following objects as a selection criterion:

  • Portion (PORTION)

  • Meter reading unit (METERREADINGUNIT)

  • Customer (CUSTOMER)

  • Contract (CONTRACT)

  • Installation (INSTALLATION)

  • Serial number (SERIALNO)

  • Enter a material (MATERIAL) or a register (REGISTER) only incombination with a serial number. If the serial number is not unique inthe system, a selection can only be made if the material is alsoentered.
    You use the parameter meter reading document type (MRDOCUMENTTYPE) tocontrol whether meter reading orders or meter reading results areselected. The parameter must be entered.
    You can restrict the selection further via the meter reading reason(MRREASON). For meter reading orders you can restrict your selectionusing the target meter reading date (TARGETMRDATEFROM, TARGETMRDATETO)and for meter reading results you can use the meter reading date(MRDATEFROM, MRDATETO).

    Notes
    Messages are returned in parameter RETURN.

    Description
    This structure may contain the following information if an erroroccurs:

    • Message type (TYPE field)

    • Message code (CODE field)

    • Message text (MESSAGE field)

    • If no errors occur, the structure remains empty.

      Value range

      Type ID Number Explanation
      E E9 011 Portion & does not exist
      E E9 011 Meter reading unit & does not exist
      E E9 011 Customer & does not exist
      E E9 011 Contract & does not exist
      E E9 011 Installation & does not exist
      E E9 011 Material & does not exist
      E E9 011 Serial number & does not exist
      E E9 011 Meter reading reason & does not exist
      E E9 080 Specify a material and a serial number
      E EG 094 Device & is not from device category &
      E EG 053 More than one device was found with the data entered
      E E9 080 Specify a register and serial number
      E E9 079 Specify a portion, meter reading unit, customer,
      contract, installation or serial number
      E E9 079 Specify meter reading document category 1
      (meter reading order) or 2 (meter reading result)
      E E9 024 Schedule to-date & after from-date &
      E E9 045 From-date & must be later than 01/01/1900
      A E9 887 Internal error: unexpected exception & when calling
      function module ISU_TIMESLICE_DATE
      A E9 887 Internal error: unexpected error & when callingfunction
      module FuBas ISU_STRUCTURE_READ
      A E9 887 Internal error: unexpected exception & when calling
      function module ISU_O_METERREAD_OPEN
      S E9 035 No objects corresponded to the selection criteria

      Description
      This parameter specifies the number of the contract for which the listof meter reading orders or meter reading results is to be selected.

      Description
      This parameter specifies the number of the customer for which the listof meter reading orders or meter reading results is to be selected.

      Description
      This parameter specifies the number of the installation for which thelist of meter reading orders or meter reading results is to beselected.

      Description
      This parameter specifies a material in order to indentify a serialnumber. Always specify a serial number with the material. If the serialnumber is unique in the system, then it is not necessary to enter amaterial.

      Description
      This parameter specifies the name of the meter reading unit for whichthe list of meter reading orders or meter reading results is to beselected.

      Description
      This parameter specifies which lower interval limit is valid for themeter reading date of the meter reading results to be selected.
      The upper interval limit is specified by the parameter MRDATETO. If themeter reading results are to be selected on a key date, the lower andupper interval limits must be the same.

      Description
      This parameter specifies which upper interval limit is valid for themeter reading date of the meter reading results to be selected.
      The lower interval limit is specified by the parameter MRDATEFROM . Ifthe meter reading results are to be selected on a key date, the lowerand upper interval limits must be the same.

      Description
      You use the parameter meter reading document category to specifywhether meter reading orders or meter reading results are selected.Enter one of the following values:

      • 1 for meter reading orders

      • 2 for meter reading results

      • Entry of this parameter is obligatory.

        Description
        You can use the number of a meter reading unit to limit the numbermeter reading orders or meter reading results to be included in thelist.

        Description
        This parameter specifies the name of the portion for which the list ofmeter reading orders or meter reading results is to be selected.

        Description
        You can use the number of a register to limit the number of meterreading orders or meter reading results for a serial number that areincluded in the list. Always enter a serial number with this parameter.

        Description
        This parameter specifies the device serial number for which a list ofmeter reading orders or meter reading results is to be selected.
        If the serial number is not unique in the system, you must specify amaterial as well.

        Description
        This parameter specifies which lower interval limit is valid for themeter reading date of the meter reading results to be selected.
        The upper interval limit is specified by the parameter TARGETMRDATETO.If the meter reading results are to be selected on a key date, thelower and upper interval limits must be the same.

        Description
        This parameter specifies which upper interval limit is valid for themeter reading date of the meter reading results to be selected.
        The lower interval limit is specified by the parameterTARGETMRDATEFROM. If the meter reading results are to be selected on akey date, the lower and upper interval limits must be the same.

        Description
        This table returns the list of all the meter reading orders or meterreading results that meet the selection criteria.

        Description
        This table returns a list of all the basic meter reading allocations ofthe selected meter reading orders or meter reading results.