Commit Work

Alon Raskin araskin at 3i-consulting.com
Tue Jun 12 09:23:52 EDT 2007


Hi Dave,
 
As per my other emails, I just don't like doing my own COMMIT WORK as it means that I am ending the LUW (Logical Unit of Work). This should be the responsibility of the 'caller'. Not the method.
 
Alon

________________________________

From: sap-wug-bounces at mit.edu on behalf of Dave Weston
Sent: Mon 6/11/2007 17:27
To: SAP Workflow Users' Group
Subject: RE: Commit Work



Alan, in step 1 are you also calling BAPI_TRANSACTION_COMMIT at the end to do the commit and apply the changes to the db ? you can also use the WAIT parameter to wait for the update to take place as well.

Dave 


-----Original Message----- 
From: sap-wug-bounces at mit.edu on behalf of Alon Raskin 
Sent: Mon 6/11/2007 5:09 PM 
To: SAP Workflow Users' Group 
Subject: Commit Work 
  
A colleague of mine is having an issue and I wanted to see if anyone has seen this before. I have seen this issue creep up on different implementations so I am sure I am not the first to handle this.

*       

        Step 1 creates a new document (doesn't matter what it is, its IS-U) by calling a BAPI 
*       

        The BAPI returns the ID of the new object which can be seen in the container of the Workflow 
*       

        Step 2 then calls SYSTEM.GenericInstantiate to get an instance of the newly created document 
*       

        Step 2 errors claiming that the object does not exist. 

I suggested to him to uncheck the Advance with Dialog step as I thought that this would 'force' the WF sub-system to do a COMMIT WORK between steps but this did not seem to work. I was sure that the Workflow sub-system always executes a COMMIT WORK between steps. Is that not the case? We did a test, and created a method where all it did was execute a COMMIT WORK. We inserted this step in between the BAPI and the System.GenericInstantiate and everything worked beautifully. So it is definitely a commit issue. Perhaps WF treats methods marked as BAPIs differently to standard methods and doesn't not do an explicit COMMIT WORK? If so, how do people get around this?

Regards, 

Alon Raskin 
  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5400 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20070612/fd792368/attachment.bin


More information about the SAP-WUG mailing list