Hi Benjamin,
Please speak with your function consultant. there is a way, which will add a message type automatically after same the document.
Some setting has to be done in NACE t-code and a perform routine has to be call from there with respect to output type.
And inside the routine, you have to validation your condition records, if it's true then you have to make sy-subrc value ZERO. and finally a new message/output type will add.
Regards,
Praveer.