Cancelling the previous workitem

Amit Moghe amitpmoghe at rediffmail.com
Thu Jun 2 08:22:57 EDT 2005


Hi Steven,

Thanks for your inputs. But if I implement the check function module, that will only prevent a new workitem from being generated and not restart the existing workitem (i.e. if an approval workflow is lying with second approver, it will not go back to first approver again). Please correct me if I am missing something.

But anyways, thanks a lot for the clarifications...

Regards,
Amit
--------------------
Hi Amit,

 

You can do this in the event linkage. This is where you link the event to a workflow. Here you can enter a check function to decide if you would like to start the WF or not. 

Transaction SWETYPV.

 

Good luck,

 

Steven Maes

 

  _____  

Van: Amit Moghe [mailto:amitpmoghe at rediffmail.com] 
Verzonden: donderdag 2 juni 2005 13:07
Aan: sap-wug at mit.edu
Onderwerp: Cancelling the previous workitem

 

Hi Kjetil,

Do you want me to call this function module before the triggering  event is published? 

If yes, then, I am afraid whether I can do that since the event is published by the standard program. Also for a moment even if I have control over publishing the event, how can I restart the same workitem?

If no, then, will you please a bit more elaborate?

I would definitely like to trigger as few workflows as possible since that would reduce my work :))

Thanks & Regards,
Amit


-------------------
It's a bit late I guess, but I would recommend using a check function instead. Then you prevent starting the second instance by looking for existing workflows related to your purchase order (function SAP_WAPI_WORKITEMS_TO_OBJECT). 

The fewer workflows started, the better - unless your salary depends on the number of started workflows.
-- 
Kjetil Kilhavn, Statoil KTJ IT BKS



________________________________

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Amit Moghe
Sent: 2. juni 2005 10:32
To: sap-wug at mit.edu
Subject: AW: Cancelling the previous workitem



Hi Michael,

  Thanks a lot for the help. It works perfectly...  

Regards,
Amit

--------
  Hi Amit,

  You can built a parallel processing in Your workflow, which ends,  
  if one of the both branches is completed. One branch includes Your 
  current workflow and the other consits of a Wait Step , which waits 
  for the event 'CHANGED' of BUS2012.


  Best regards
  Michael Ludwig
  rku.it GmbH

    -----Ursprüngliche Nachricht-----
    Von: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] Im Auftrag von Amit Moghe
    Gesendet: Donnerstag, 2. Juni 2005 08:34
    An: sap-wug at mit.edu
    Cc: amitpmoghe at rediffmail.com
    Betreff: Cancelling the previous workitem
    
    

    Hi Workflow Gurus,
    
    I am new to workflow and need some help.
    
    I have a workflow for which I am using 'CHANGED' event of the business object BUS2012 (Purchase Order) as the triggering event. When a user changes a particular PO, this workflow starts. But before it is completed if there is another change to the same PO, then, one more workitem is started.
    
    My requirement is that if there is change to the PO, then, it should delete the previous workitem and start a new workitem. Can you please advise me as to how this can be achieved?
    
    Thanks in advance.
    
    Regards,
    Amit

  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20050602/60e092c1/attachment.htm


More information about the SAP-WUG mailing list