Hi All,
Thanks for all your replies.
@Luis: It's a custom error which is added after the document save and thus no problem to create a follow up.
@Tom: Thanks. This FM works.
For those who are interested to know how this is resolved, please refer to the program CRM_MESSAGES_DELETE. Inside this the FM mentioned by Tom is used.
Thanks,
Faisal