How to know if a workflow instance have already been executed

Cristiana D'Agosto cristiana.dagosto at au1.ibm.com
Wed Jun 15 21:26:21 EDT 2005


4.7

>From MIR7, upon selecting button Save as Completed, obj type/event 
bus2081.completedtorelease is published.

In my client, this event can start more than one customized workflows: 
withholding tax approval and release for posting workflow.

I have a receiver FM that is testing if the withholding tax approval 
workflow should start (based on Vendor master data); if it doesnt then the 
release for posting workflow starts.

Withholding tax approval wf : goes to the agent to enter details on 
regards to withholding tax and then goes to AP. The AP guys then enter 
whatever they have to in the invoice and click Save as Completed - 
bus2081.completedtorelease is published and bus2081.completedtoreleased is 
published.

I need to control that workflow for withholding tax approval does not 
start again.

How in my receiver FM can I check if the withholding tax approval workflow 
has been completed or it is being processed ? The withholding tax approval 
should only start once (if applicable, depends on vendor master data).

If the vendor in the invoice is subject to withholding tax, I am using FM 
SWI_WORKITEMS_OF_OBJECT_GET to retrieve all the workflows that have 
started for my objkey and then checking if there is any instance of the 
withholding tax approval that is set to either 'completed' or 'started' - 
but I think the events happen too fast and table swwwihead doesn't get 
update on time.

The client would like to have the users always using button Save as 
Completed.

1 - bus2081.completedtorelease 
2 - Receiver FM is called
3 - Within FM: 
if withholding tax is applicable then
------ if withholding tax approval workflow has not been executed for this 
invoice or it is not set to completed nor to started then
-------------- start release for posting approval worlflow
-------else
-------------- start withholding tax approval workflow
------ end if
else
-------- start release for posting approval workflow
end if

Any ideas on how to achieve what I need? 

Much thanks for any help!

Regards,

Cristiana
_________________________________
Cristiana d'Agosto
IBM Business Consulting Services
Mobile:  +61 417 927 224
cristiana.dagosto at au1.ibm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20050616/08992d8b/attachment.htm


More information about the SAP-WUG mailing list