Warning notifications not appearing in MIRO transaction using BADI implementation

I need to show alert messages in MIRO transaction when specific conditions are met. I tried using the INVOICE_UPDATE BADI with the CHANGE_AT_SAVE method but the warnings don’t appear even though my code runs.

I found out that after my BADI executes, the system checks if the transaction runs in dialog mode before showing messages. Are there alternative user exits or BADIs I can use to display warnings to users?

Here’s the code pattern I discovered:

IF result <> 0.
  IF invoice_header-process_type NE dialog_constant.
    MESSAGE ID system-message_id TYPE system-message_type NUMBER system-message_number
           WITH system-var1 system-var2 system-var3 system-var4.
  ELSE.
    CALL FUNCTION 'STORE_MESSAGE'
         EXPORTING
              message_class = system-message_id
              message_type = system-message_type
              variable1 = system-var1
              variable2 = system-var2
              variable3 = system-var3
              variable4 = system-var4
              text_number = system-message_number.
  ENDIF.
ENDIF.

Had the same problem - super frustrating. The issue with INVOICE_UPDATE for alert messages is all about timing. When CHANGE_AT_SAVE kicks in, MIRO’s already blown through most validation checks, so messages won’t display.

I switched to the MRM_INVOICE_POSTING BADI using the CHECK_BEFORE_POST method. It fires earlier in the flow while still in dialog mode, so messages actually show up. If you want to stick with INVOICE_UPDATE, try the CHECK method instead of CHANGE_AT_SAVE. It runs during validation and keeps the dialog context intact for proper message display. Just make sure your logic matches the transaction rules.