Usually I use some code similar to following sample to remove my previous message in PR/PO BAdI:
mmpur_context mmcnt_context_badi.
if data-id isinitial.
mmpur_remove_msg_by_context data-id mmcnt_context_badi.
endif.
(where data is structure get from... get_data for current object, header/item/account)
Regards,
Raymond