I’m trying to display a warning message in the MIRO transaction when specific criteria are fulfilled. I implemented the ‘INVOICE_UPDATE’ BADI and used the ‘CHANGE_AT_SAVE’ method, but I’m not seeing the warning message even though my BADI seems to be working.
It appears that messages will only be shown if the transaction is initiated in dialog mode. This check happens after my BADI is called:
IF sy-subrc <> 0.
IF s_rbkp-ivtyp NE c_ivtyp_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.
Are there any other user exits or methods I can use to display warning messages for the user in MIRO?
Have you tried the FI_ITEMS_CH00 enhancement point? I hit this exact issue two years ago and that’s what fixed it for me. MIRO has its own message handling that messes with standard BADI processing. I implemented the enhancement at FI_ITEMS_CH00 and used MESSAGE with TYPE ‘W’ directly there. Timing matters - this enhancement hits at the right moment when MIRO can still show messages to users. Don’t just store the message, trigger it at the correct point during save. Also check if your BADI implementation is active and registered properly.
This is a common MIRO message handling issue. Don’t rely just on the INVOICE_UPDATE BADI - try the MRM_ITEMS_AND_LIMITS enhancement spot instead. It gives you better control over when messages display. Use enhancement MRMH0001 in that spot since it runs before the dialog mode check. You can also call the MESSAGE_STORE function module directly in your BADI. This forces your message into the container no matter what execution mode you’re in. I’ve had good luck calling MESSAGE_STORE with your warning message parameters right after validation logic runs. Just make sure your message gets stored before MIRO’s internal processing kicks in.
I faced a similar issue too. Try using CHECK_BEFORE_SAVE instead of CHANGE_AT_SAVE since it gets triggered earlier—this should help your warning show up properly. Also, make sure your message type is set to ‘W’, not ‘E’, or it might behave unexpectedly in MIRO.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.