I have created a delegate Business Object ZBUS2032 (for BUS2032 SalesOrder) with a new event WEBORDERCREATED. I call the function SWE_EVENT_CREATE_FOR_UPD_TASK in the user exit USEREXIT_SAVE_DOCUMENT (MV45AFZZ). This call occurs just after the standard "CREATE" event in routine BELEG_SICHERN in program SAPMV45A. The only difference I can see between my custom call and the standard SAP call is that I am passing container parameters (event...
parameters) as opposed to SAP's calls, which passes non container parameters. My workflow event intermittently is disabled (SWETYPEENA) because it encounters an OL364 error (Errors in container (element 'SalesOrder' is not an object).
My question is: If SWE_EVENT_CREATE_FOR_UPD_TASK is supposed to handle the event creation in the update process, why does it appear that the SalesOrder data is still not committed to the database before the event is created?
I don't think the problem here lies with COMMIT WORK. I think the problem lies in the fact that before you raise the event, the container elements have not been committed to the Database. SAP Workflow stores all container elements inside two tables SWW_CONT (data elements) and SWW_CONTOB (object references).
To fix your problem, I recommend you make the following macro call before calling Function Module SWE_EVENT_CREATE_FOR_UPD_TASK.
Where event_container is the container of event parameters.
If the problem is still not resolved, try making a call to the macro SWC_OBJECT_TO_PERSISTENT passing in the object reference that you are raising the event on.
You will need to include
I can not be certain that these suggestions will fix your problem but this is where I would start.
Related Q&A from Alon Raskin
Find out how to configure clients so that the same version of an SAP workflow item is used when the workflow is triggered in separate clients.continue reading
An SAP user has created a user decision step in an SAP workflow item and wants to know how an end user can send an attachment to other users.continue reading
A SearchSAP.com reader wants to know how to hide the forward button in an SAP Business Workplace toolbar.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.