[RMX:WL] Re: Check Function Module - how to stop duplicate WF trigger

James Johnson JJOHNSON at uk.ibm.com
Tue Oct 1 16:21:13 EDT 2013


One other thing to consider - if the two events are being generated in a 
very short timeframe, and you're using the event queue to deliver the 
event, you may wish to revise using the event queue (if you get low 
volumes of these events), or look at the event queue table if Susan's 
check on a workflow existence fails (just to ensure there's not one in the 
queue waiting to be created).  Not sure if there's a WAPI to check this, 
but it's table SWEQUEUE for reference.

Best Regards,
James Johnson

E-mail:JJohnson at uk.ibm.com
Mobile: 07908715224 or 07920870270



From:   "Keohan, Susan - 1140 - MITLL" <keohan at ll.mit.edu>
To:     "SAP Workflow Users' Group" <sap-wug at mit.edu>, 
Date:   01/10/2013 20:48
Subject:        RE: [RMX:WL] Re: Check Function Module - how to stop 
duplicate WF    trigger
Sent by:        sap-wug-bounces at mit.edu



Creating a Check Function is one way to go, but be sure to use WAPI’s – 
don’t read directly against workflow system tables please.
 
      CALL FUNCTION 'SAP_WAPI_WORKITEMS_TO_OBJECT'
        EXPORTING
*         OBJECT_POR               =
          objtype                  = ‘yourobject’
          objkey                   = l_objnr   “ Object key
*         TOP_LEVEL_ITEMS          = 'X'
          selection_status_variant = 0001
        TABLES
*         TASK_FILTER              =
          worklist                 = it_worklist
*         MESSAGE_LINES            =
*         MESSAGE_STRUCT           =
        .
 
      DESCRIBE TABLE it_worklist LINES l_lines.
      IF l_lines <> 0.
        RAISE no_workflow.
      ENDIF.
 
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf 
Of Prakashreddy Sabbu
Sent: Tuesday, October 01, 2013 11:17 AM
To: SAP Workflow Users' Group
Subject: RE: [RMX:WL] Re: Check Function Module - how to stop duplicate WF 
trigger
 
Hi Karsten,
Follow the below steps that would help.
 
Right now the issue is becuase of triggering the Create event twice for 
the same document.
 
Create a function module which is to read the entries from SWWIHEAD table 
with workflow template number , Task number (Task Number you can say the 
User decision or the first step in the workflow) and the document number 
(Workflow Instance). If the entry does already exists the workflow should 
not trigger for the second time.
 
Assing this function module as Check Fucntion module in event linkage 
table (SWETYPV) which can stop the reciver fucntion module to trigger the 
workflow for the second time.
 
Thanks,
Prakash S.

From: sap-wug-bounces at mit.edu [sap-wug-bounces at mit.edu] on behalf of 
Ernst, Karsten [Karsten.Ernst at fhp-ww.com]
Sent: Tuesday, October 01, 2013 1:22 PM
To: SAP Workflow Users' Group
Subject: RE: [RMX:WL] Re: Check Function Module - how to stop duplicate WF 
trigger
Hi Sheldon,
thanks for the hint with the note and especially the SWEC.
 
Currently we only have set the flag for CREATE in the respective object.

 
Nevertheless the system issues the event after a change to the PO as well.
What we do is the following.
After the  creation of a purchase requisition of a certain scenario we 
call a function module which transfers the purch.requistion into a PO 
using FM 'BAPI_PO_CREATE1'. 
For some cases we need to do some adjustments to the just created PO and 
we do this after the document is available on the database using FM 
'BAPI_PO_CHANGE'. Unfortunately the adjustment we need to do is not 
possible to be set in the initial CREATE step.
And it looks like the 'BAPI_PO_CHANGE' is causing the system to create 
another BUS2012.RELEASESTEPCREATED event. In my opinion this should not 
happen according to the setup in SWEC .
 
Any ideas??
 
Best regards
Karsten
 
 
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf 
Of Sheldon Oxenberg
Sent: Monday, September 30, 2013 4:56 PM
To: SAP Workflow Users' Group
Subject: [RMX:WL] Re: Check Function Module - how to stop duplicate WF 
trigger
 
Hi Karsten,

I believe many of us have encountered this before.  You may need to remove 
config in Transaction SWEC.
Please review SAP Note 797775, and you can search the internet, for 
example, "SAP bus2012 releasestepcreated event"

Regards,
Sheldon Oxenberg
CSC


"Ernst, Karsten" ---09/30/2013 10:35:51 AM---Hi everybody, I have quite a 
strange but interesting question I think to the experts in the group.

From: "Ernst, Karsten" <Karsten.Ernst at fhp-ww.com>
To: "sap-wug at mit.edu" <sap-wug at mit.edu>
Date: 09/30/2013 10:35 AM
Subject: Check Function Module - how to stop duplicate WF trigger
Sent by: sap-wug-bounces at mit.edu




Hi everybody,
 
I have quite a strange but interesting question I think to the experts in 
the group.
Due to the pre-processing setup the PO event BUS2012.RELEASESTEPCREATED is 
issues twice for the same object (same PO) within seconds.
We see no chance to prevent the double triggering of the event and this 
should not be the discussion here.
What I am looking for is your help on how to implement a Check Function 
Module to be integrated in the Event Type Linkage.
I would like to determine if there is already an active WF instance 
available for the current PO number (should be the object key of the 
event) and if this is the case the event should raise an exception and 
should not trigger the WF to start.
If possible it might be could to check the WF Number / Receiver Type 
(WS9…) as well.
 
As I have limited knowledge on how to implement this and especially on how 
to check for the active 1st instance of the workflow for the current 
object, any hint or code snippet is highly appreciated.
 
Best regards
Karsten
 
Karsten Ernst
 
Freudenberg Home and Cleaning Solutions GmbH 
Supply Chain Management Systems and Processes
 
Mail:     Karsten.Ernst at fhp-ww.com
  
 

Freudenberg Home and Cleaning Solutions GmbH
Im Technologiepark 19, D-69469 Weinheim

Geschäftsführer: Dr. Klaus Peter Meier, Arndt Miersch, Frank Reuther
Sitz der Gesellschaft: Weinheim, Amtsgericht Mannheim HRB 431930
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug
 

Freudenberg Home and Cleaning Solutions GmbH
Im Technologiepark 19, D-69469 Weinheim

Geschäftsführer: Dr. Klaus Peter Meier, Arndt Miersch, Frank Reuther
Sitz der Gesellschaft: Weinheim, Amtsgericht Mannheim HRB 
431930[attachment "smime.p7s" deleted by James Johnson/UK/IBM] 
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20131001/77dac3a9/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 40347 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20131001/77dac3a9/attachment-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20131001/77dac3a9/attachment-0001.gif


More information about the SAP-WUG mailing list