Hi ,
I need to start workflow when invoice is created. As there is no standard event for the same, so I created new business object and trigger the event with FM SWE_EVENT_CREATE calling in user exit USEREXIT_SAVE_DOCUMENT_PREPARE in include RV60AFZZ.
This works perfectly fine when I create an invoice with VF01. But when a batch program RV60SBAT is called for the same, this is when i am facing the problem. This program takes multiple delivery numbers and creates more than one invoice documents. And in debug i see that event is created two times. Even in SWEL i see that event is created for each invoice document created.But workflows work for last document only.Workflow is a background activity which updates a table.Entries for last document are only updated. I feel this is something related to update task or some bundling technique that might be used in standard program. I mean most probably last document number is being passed to all workflows. Please help me how to counter this problem and send individual number to each workflow.