Warning notifications not appearing in MIRO transaction through BADI implementation

I need to show warning alerts 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 successfully.

I found that after my BADI executes, the system runs this logic to handle message display based on dialog mode:

IF result_code <> 0.
  IF header_data-processing_type NE dialog_constant.
    MESSAGE ID message_id TYPE message_type NUMBER message_number
           WITH text_var1 text_var2 text_var3 text_var4.
  ELSE.
    CALL FUNCTION 'STORE_MESSAGE_TEXT'
         EXPORTING
              message_class = message_id
              msg_type = message_type
              text1 = text_var1
              text2 = text_var2
              text3 = text_var3
              text4 = text_var4
              message_num = message_number.
  ENDIF.
ENDIF.

Is there another user exit or enhancement point where I can properly display warning messages to users in MIRO?

I had the same MIRO warning issue. The CHANGE_AT_SAVE method in INVOICE_UPDATE BADI fires too late - the system’s already committed to processing by then. What fixed it for me was using the MRM_WORKFLOW_AGENTS user exit instead, specifically in USEREXIT_PROCESS_ITEM. This exit runs earlier during document validation when the system can still handle warning messages properly in dialog mode. Just check your conditions there and use the standard MESSAGE statement with type ‘W’. Timing’s everything here - warnings need to be evaluated before the final save stage where your current BADI runs.