Need your help with a tricky issue in our system.
We have an output type defined to send invoice output as email. Lately we have an issue with this.
If we trigger the output in foreground it works fine. But when we create the invoices from batchjob it is triggering multiple emails for the same invoice. When we check the output in invoice it was triggered only once. Even in NAST also we have only one entry for these invoices. This issue is happening randomly not for all the invoices created through batch.
To nailed down the issue we have added code to update the application log in the output program. It wil update the application log in SLG1 transaction when ever the output program was called. Surprisingly even for the cases where the mail triggered multiple times we have only one entry in the log. It means even though the mail sent multiple times, it is calling the output porgam only once.
We are not able to replicate this issue even after mulitple trails.
Please suggest how we can find the root cause for this issue. All the ideas are welcome.