Skip to Content
Author's profile photo Bruno Xavier

Show transaction/event Display Correctly in MIR4 and MIR6 through enhancement

Scenario:
Documents created in MIRO transaction type (subsequent debit) and (subsequent credit) appear otherwise in transactions MIR4 and MIR6.
I have not found any solution for note correction.
I investigated the problem and fix through enhancement due to the need for some customers.


 

The solution is very simple but of great value to customers.

1) Create an enhancement in the function (MRM_INVOICE_READ) below this point:

image

Display of documents after the implementation of correction:

To (1-Invoice) remains the same:

image

To (2-Credit memo) remains the same:

image

Here comes the difference to (3-Subsequent Debit) as seen earlier (1-Invoice)image

Here comes the difference to (4-Subsequent Credit) as seen earlier (2-Credit Memo)

image

 


Bellow only the two figures before the enhancement as they appeared.

(3-Subsequent Debit) appeared as (1-Invoice)

image

(4-Subsequent Credit) appeared as (2-Cerdit Memo)

image

Analyzing tables RBKP and RSEG i could see the following combination:

1-(Invoice)
rbkp-xrech = ‘X’.
rseg-tbtkz  = ‘ ‘.

2-(Credit Memo)
rbkp-xrech = ‘ ‘.
rseg-tbtkz  = ‘ ‘.

3-(Subsequent Debit)
rbkp-xrech = ‘X’.
rseg-tbtkz  = ‘X’.

4-(Subsequent Credit)
rbkp-xrech = ‘ ‘.
rseg-tbtkz  = ‘X’.

Assigned Tags

      12 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Pablo Casamayor
      Pablo Casamayor
      Hi,

      for which release would this be applicable?
      in my system (SAP ERP Central Component 5.0 / SAP ECC 6.0)though i have tried several subsequent-debits / subsequent-credits it seems not necessary.
      I´ve checked both transactions MIR4 and MIR6.

      Best regards.

      Author's profile photo Pablo Casamayor
      Pablo Casamayor
      Hi,

      have you checked this OSS Note?:
      Note 386029 - MIRO: Subsequent change to "Subsequent debit"
      https://service.sap.com/sap/support/notes/386029

      Best regards.

      Author's profile photo Bruno Xavier
      Bruno Xavier
      Blog Post Author
      Hi Pablo,

      Thanks for the note!
      I checked now but did not apply to my system.
      Below is the information of my system:
      Component Software: SAP_APPL
      Release: 603
      Level: 001
      Highest Support Package: SAPKH60301

      Regards
      Bruno.

      Author's profile photo Bruno Xavier
      Bruno Xavier
      Blog Post Author
      Hi Pablo,

      I had this problem in versions 6.0 ECC in the country Brazil, do not know if the country makes a difference.

      I never got to test this in the ECC 5.0 environment we have almost no customers in this version.

      Regards
      Bruno.

      Author's profile photo Pablo Casamayor
      Pablo Casamayor
      Hi,

      i have as well versions 6.0 ECC in the country Brazil but i have no problem with RM08M-VORGANG.
      Maybe i have a development i´m not aware of that corrects this.
      But when i debugg MIR4 field RM08M-VORGANG is set here:
      program  SAPLMR1M
      include  LMR1MF5D
      FORM     USER_DEFAULTS_SET

      CALL FUNCTION 'ES_READ_USER_SETTINGS'
        EXPORTING
          iaction = c_action_miro
          iuname  = h_uname
        TABLES
          iesdus  = tab_user_settings.

      Vorgang
      GET PARAMETER ID 'TRANSACTION' FIELD rm08m-vorgang.
      IF rm08m-vorgang is initial.
      READ TABLE tab_user_settings WITH KEY action  = c_action_miro
                                          element = 'VORGANG'.
      IF sy-subrc IS INITIAL.
        MOVE tab_user_settings-active TO  rm08m-vorgang.
      ELSE.
        rm08m-vorgang = '1'.
      ENDIF.
      ENDIF.

      Best regards

      Author's profile photo Bruno Xavier
      Bruno Xavier
      Blog Post Author
      Hi Pablo,

      I turned off the enhancement for a test.

      In debug at the point shown by you to the document 5105601852/2010 (3-Subsequent Debit) appears as 1-Invoice in MIR4.

      Code where it stopped for me: "MOVE tab_user_settings-active TO  rm08m-vorgang" with the value "1" in variable rm08m-vorgang.

      I would to know what fixes it not to need this enhancement.

      I did this test in an environment with SupportPackage SAPKH60301

      Regards
      Bruno.

      Author's profile photo Pablo Casamayor
      Pablo Casamayor
      Hi,

      my support package is SAPKH60016.

      The difference seems to be that when i call fm ES_READ_USER_SETTINGS
      i receive this value in  tab_user_settings:

      ACTION = MIRO
      ELEMENT = VORGANG
      ACTIVE = 3

      whereas you receive this value:

      ACTION = MIRO
      ELEMENT = VORGANG
      ACTIVE = 1

      in fm ES_READ_USER_SETTINGS there is this select statement:

      SELECT * FROM ESDUS WHERE UNAME = IUNAME AND
                              ACTION = IACTION.
        MOVE-CORRESPONDING ESDUS TO ACTUAL_SETTINGS.
        APPEND ACTUAL_SETTINGS.
      ENDSELECT.

      where IUNAME = 'YOUR_USER_ID'
      and IACTION = 'MIRO'

      Best regards.

      Author's profile photo Pablo Casamayor
      Pablo Casamayor
      Hi,

      regarding table ESDUS i´ve found this OSS Note:
      Note 1407204 - MM: Dynamic User Settings lost (table ESDUS)
      https://service.sap.com/sap/support/notes/1407204

      Best regards.

      Author's profile photo Bruno Xavier
      Bruno Xavier
      Blog Post Author
      Hi Pablo,

      Thanks for the note and by perseverance.

      I applied note 1407204 by the transaction SNOTES with successfully. Implementation Stat: "Completely Implemented".
      I set processing status to Finished.

      I log off the SAP and I entered again but the error remains.

      I will look for more notes on the subject.

      Thanks
      Bruno.

      Author's profile photo Pablo Casamayor
      Pablo Casamayor
      Hi,

      this could be another reason:
      Note 1407204 - MM: Dynamic User Settings lost (table ESDUS)
      https://service.sap.com/sap/support/notes/1407204

      Best regards.

      Author's profile photo Former Member
      Former Member

      Hi Bruno,

      Thanks for providing this useful blog - we had the exact same problem in ECC5 EhP5

      I tried programming via the Enhancement Implementation method following your notes without success.  In debug/breakpoints my code never ran.

      When I looked at the Enhancement Point OIA_SI_SAPLMRT3 definition I noticed the 'Switch' property and value of 'off'.  Switch OIA_SPLIT_INVOICING has to be enabled via SFW5 for the code to trigger.

      Eventually, I placed the code at the end of function MRM_INVOICE_READ to avoid any further complications:

      field-symbols: <fs_drseg> type mmcr_drseg.

      loop at t_drseg assigning <fs_drseg>.

         if not <fs_drseg>-tbtkz is initial.

           e_rbkpv-tbtkz = 'X'.

         endif.

      endloop.

      Best regards

      Paul

      Author's profile photo Luka Puntar
      Luka Puntar

      This is SAP standard behaviour... check note 366713.