SAP MIRO warning message not showing

Hey everyone, I’m stuck with a problem in SAP MIRO. I’m trying to show a warning when certain criteria are met. I used the BADI ‘INVOICE_UPDATE’ with the ‘CHANGE_AT_SAVE’ method. But the message isn’t popping up even though my BADI is being called.

I noticed some code that checks if it’s in dialog mode before showing messages. Is there another way to make warning messages appear? Maybe a different user exit?

Here’s a similar code snippet to what I found:

IF NOT is_dialog_mode.
  CALL FUNCTION 'DISPLAY_MESSAGE'
    EXPORTING
      message_type   = 'W'
      message_text   = 'Warning: Criteria met'
      message_number = '001'.
ELSE
  CALL FUNCTION 'STORE_MESSAGE'
    EXPORTING
      message_type   = 'W'
      message_text   = 'Warning: Criteria met'
      message_number = '001'.
ENDIF.

Any ideas on how to get this working? Thanks in advance!

have u tried using message_type ‘E’ instead of ‘W’? sometimes SAP treats warnings differently. also, check if ur BADI implementation is active and if the user has proper authorizations. if nothing works, maybe try hooking into the MIRO transaction directly with a user exit. good luck!