Dequeue Work Item

Florin Wach florin.wach at gmx.net
Thu Jun 12 05:53:51 EDT 2008


Hi Sandy,

I have experienced a very similar problem and I worked around that by using the new ABAP-Objects for the workitem's container. But apparently that container get's rolled back whenever the work item was cancelled (and not fully processed).  By the way, I'm talking about a synchronous dialog step.

Instead of writing the value immediatly back to the container, you could use the EXPORT TO MEMORY statement to pass information back from the transaction to the calling business object method, picking it up there to pass it back via the method container (as plain exporting element).
Another possibility could be, to use a separate database table with the work*flows* WI_ID as the key field and you pass this to the transaction (as hidden parameter or so). The transaction then can put entries there, as you wish, and you create an extended WORKITEM object with a virtual attribut holding the information from the db table. In the workflow you can then use the instance of the workflow itself to access it.

Maybe this gives you some more ideas.

Best wishes,
Florin

-------- Original-Nachricht --------
> Datum: Thu, 12 Jun 2008 17:25:26 +0800
> Von: Sandy <maorriyan.santoso at gmail.com>
> An: "SAP Workflow - MIT" <sap-wug at mit.edu>
> Betreff: Dequeue Work Item

> Hi All.
> 
> I have workflow task that execute ABAP program via call transaction. So
> when
> user receive work item they execute work item and bring ABAP program.
> Within this program user need to click certain button. When they execute
> certain button, data base field get updated and need to update task
> container element.
> 
> The design is when work item executed, it send work item to ABAP program
> and
> do SAP_WAPI_WRITE_CONTAINER to update container element depend on selected
> button.
> I got enqueue error message says that work item has been locked by the
> user
> it self.
> It is obvious when user execute work item and transaction called, work
> item
> still get locked.
> 
> Is there any alternative to update container element of work item while
> work
> item executed?
> Statement "LEAVE TO TRANSACTION" is not an option since I need to pass
> parameters value when I call ABAP transaction



More information about the SAP-WUG mailing list