MIRO BADI message

1.9k Views Asked by At

I am working on a requirement to display warning message on MIRO when information entered meets required criteria. I have implemented BADI 'INVOICE_UPDATE' and using method "CHANGE_AT_SAVE".However i noticed the message is not being displayed even after my BADI implementation is being called.

I noticed that after BADI is called the following code executed to check and message are display if the transaction/posting is done in dialog mode. Is there a other user exit where i can display warning messages to the user?

  IF sy-subrc <> 0.

  IF s_rbkp-ivtyp NE c_ivtyp_dialog. " dialog...

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.

    CALL FUNCTION 'MESSAGE_STORE'

         EXPORTING

              arbgb = sy-msgid

              msgty = sy-msgty

              msgv1 = sy-msgv1

              msgv2 = sy-msgv2

              msgv3 = sy-msgv3

              msgv4 = sy-msgv4

              txtnr = sy-msgno.

  ENDIF.

ENDIF.
1

There are 1 best solutions below

0
On

are these variables filled? You can always use (if u have) message class and create a new one that suits what you need. EX:

MESSAGE e081(zdssd_exits) WITH i_vbrk-sfakn. "error message, stop action, keeps track

OR simple way without class (can´t track error message)

MESSAGE 'whatever you want' TYPE 'I'. "Check all the types and what suits you

https://wiki.scn.sap.com/wiki/display/ABAP/ABAP+Message+Error+Handling+Standards https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapmessage.htm

Hope it helped

Cheers