Hi Jurgen,
I made the story a bit small.
Here is how it goes.
Our legacy system posts a PO. through a sync web interface.
PO is created with all required messages, the PO may or may not be in released status.
Lets say the PO is in blocked status, now the user deleted the PO in legacy system. immediately we trigger a change marking deletion indicator on all line items.
Now at this point the PO output "ZNEU" is still being generated with just header no products as an email. Well at the same time the approver may delete it entirely because he is a user and have access to do so technically.
As per the above recommendation from Bijay, I did verified the code there is no stopping based on deletion indicator, that might be an easy fix.
But again as I claim is this the only way ?
Thanks,
Sai