<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to reverse a meter reading in a program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-reverse-a-meter-reading-in-a-program/m-p/6821386#M1470242</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'ISU_O_METERREAD_OPEN'
    EXPORTING
      x_anlage              = l_anlage
      x_adatsoll            = l_adatsoll
      x_ablbelnr            = l_ablbelnr
      x_ablesgr             = l_ablesgr
      x_select2             = '2'
     x_wmode               = '6'
      x_upd_online          = space
      x_no_dialog           = 'X'
      x_aufruf              = '01'
      x_karenzprfg          = 'X'
    IMPORTIN
      y_obj                 = ls_obj
    EXCEPTIONS
      not_found             = 1
      foreign_lock          = 2
      internal_error        = 3
      input_error           = 4
      existing              = 5
      number_error          = 6
      general_fault         = 7
      system_error          = 8
      manual_abort          = 9
      gasdat_not_found      = 10
      no_mrrel_registers    = 11
      internal_warning      = 12
      not_authorized        = 13
      not_qualified         = 14
      anpstorno_not_allowed = 15
      already_billed        = 16
      OTHERS                = 17.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    l_error = 'X'.
  ELSE.
    ls_obj-contr-no_change = space.
    ls_obj-contr-no_other = space.
    ls_obj-contr-enq_done = 'X'.


    CALL FUNCTION 'ISU_O_METERREAD_ACTION'
         EXPORTING
              x_okcode             = 'PSAV'
         CHANGING
              xy_obj               = ls_obj
         EXCEPTIONS
              cancelled            = 1
              failed               = 2
              action_not_supported = 3
              system_error         = 4
              input_error          = 5
              not_allowed          = 6
              not_customized       = 7
              reestimation_failed  = 8
              path_invalid         = 9
              date_invalid         = 10
              internal_error       = 11
              general_fault        = 12
              OTHERS               = 13.

    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
           WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      l_error = 'X'.
    ELSE.

      CLEAR tb_eabl.
      REFRESH tb_eabl.

      CALL FUNCTION 'ISU_O_METERREAD_ACTION'
        EXPORTING
          x_okcode             = 'SAVE'
        TABLES
          yt_eabl_delete       = tb_eabl
        CHANGING
          xy_obj               = ls_obj
        EXCEPTIONS
          cancelled            = 1
          failed               = 2
          action_not_supported = 3
          system_error         = 4
          input_error          = 5
          not_allowed          = 6
          not_customized       = 7
          reestimation_failed  = 8
          path_invalid         = 9
          date_invalid         = 10
          internal_error       = 11
          general_fault        = 12
          OTHERS               = 13.

      IF sy-subrc &amp;lt;&amp;gt; 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        l_error = 'X'.
      ENDIF.
    ENDIF.
  ENDIF.

  IF l_error IS INITIAL.
    COMMIT WORK AND WAIT.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: xavier kerouanton on Mar 31, 2010 3:28 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: xavier kerouanton on Mar 31, 2010 3:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Mar 2010 13:28:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-31T13:28:23Z</dc:date>
    <item>
      <title>How to reverse a meter reading in a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-reverse-a-meter-reading-in-a-program/m-p/6821385#M1470241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to reverse a meter reading in a similar way as: &lt;/P&gt;&lt;P&gt;T-code EL37 &lt;/P&gt;&lt;P&gt;--&amp;gt; Writing installation --&amp;gt; Executing&lt;/P&gt;&lt;P&gt;--&amp;gt; Selecting reading --&amp;gt; Reversing&lt;/P&gt;&lt;P&gt;but instead of using the transaction, doing it directly in a program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made some research and found these FMs:&lt;/P&gt;&lt;P&gt;ISU_METERREAD_CANCEL, ISU_O_METERREAD_OPEN&lt;/P&gt;&lt;P&gt;but I haven't been successful in reversing the meter reading using these FMs.&lt;/P&gt;&lt;P&gt;Does anybody knows what to pass to these FMs or any other FM to reverse a meter reading, or how to reverse a meter reading (in code)?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 20:58:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-reverse-a-meter-reading-in-a-program/m-p/6821385#M1470241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T20:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to reverse a meter reading in a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-reverse-a-meter-reading-in-a-program/m-p/6821386#M1470242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'ISU_O_METERREAD_OPEN'
    EXPORTING
      x_anlage              = l_anlage
      x_adatsoll            = l_adatsoll
      x_ablbelnr            = l_ablbelnr
      x_ablesgr             = l_ablesgr
      x_select2             = '2'
     x_wmode               = '6'
      x_upd_online          = space
      x_no_dialog           = 'X'
      x_aufruf              = '01'
      x_karenzprfg          = 'X'
    IMPORTIN
      y_obj                 = ls_obj
    EXCEPTIONS
      not_found             = 1
      foreign_lock          = 2
      internal_error        = 3
      input_error           = 4
      existing              = 5
      number_error          = 6
      general_fault         = 7
      system_error          = 8
      manual_abort          = 9
      gasdat_not_found      = 10
      no_mrrel_registers    = 11
      internal_warning      = 12
      not_authorized        = 13
      not_qualified         = 14
      anpstorno_not_allowed = 15
      already_billed        = 16
      OTHERS                = 17.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    l_error = 'X'.
  ELSE.
    ls_obj-contr-no_change = space.
    ls_obj-contr-no_other = space.
    ls_obj-contr-enq_done = 'X'.


    CALL FUNCTION 'ISU_O_METERREAD_ACTION'
         EXPORTING
              x_okcode             = 'PSAV'
         CHANGING
              xy_obj               = ls_obj
         EXCEPTIONS
              cancelled            = 1
              failed               = 2
              action_not_supported = 3
              system_error         = 4
              input_error          = 5
              not_allowed          = 6
              not_customized       = 7
              reestimation_failed  = 8
              path_invalid         = 9
              date_invalid         = 10
              internal_error       = 11
              general_fault        = 12
              OTHERS               = 13.

    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
           WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      l_error = 'X'.
    ELSE.

      CLEAR tb_eabl.
      REFRESH tb_eabl.

      CALL FUNCTION 'ISU_O_METERREAD_ACTION'
        EXPORTING
          x_okcode             = 'SAVE'
        TABLES
          yt_eabl_delete       = tb_eabl
        CHANGING
          xy_obj               = ls_obj
        EXCEPTIONS
          cancelled            = 1
          failed               = 2
          action_not_supported = 3
          system_error         = 4
          input_error          = 5
          not_allowed          = 6
          not_customized       = 7
          reestimation_failed  = 8
          path_invalid         = 9
          date_invalid         = 10
          internal_error       = 11
          general_fault        = 12
          OTHERS               = 13.

      IF sy-subrc &amp;lt;&amp;gt; 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        l_error = 'X'.
      ENDIF.
    ENDIF.
  ENDIF.

  IF l_error IS INITIAL.
    COMMIT WORK AND WAIT.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: xavier kerouanton on Mar 31, 2010 3:28 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: xavier kerouanton on Mar 31, 2010 3:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Mar 2010 13:28:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-reverse-a-meter-reading-in-a-program/m-p/6821386#M1470242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-31T13:28:23Z</dc:date>
    </item>
  </channel>
</rss>

