[RMX:WL] Re: Check Function Module - how to stop duplicate WF trigger
Kjetil Kilhavn
list.sap-wug at vettug.no
Wed Oct 2 07:28:17 EDT 2013
Tirsdag 1. oktober 2013 09.52.34 skrev Ernst, Karsten:
> 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.
Do you have RELEASESTEPCREATED entries in SWEC for creation of other object
types? I suppose you don't, otherwise there should always be two events, even
for POs that are not adjusted.
> 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.
Hmmm… I hear what you are saying, but I don't see any evidence ;-)
What you are saying is that there is some random magic between your call to
BAPI_PO_CREATE1 and your call to BAPI_PO_CHANGE - I call it random magic
because you claim that it is not possible to perform the adjustment in the
initial step - which is only really true if something unpredictable happens
during creation.
> 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 .
In general the event can always happen after a change, because the change may
lead to a new release strategy, or reapproval of an already released PO may be
required after the change. However, not every change should lead to the event,
so I think you need to investigate it further. Implementing a check function
can cause problems when there really *is* need for a new release workflow.
> 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
>
>
> [cid:image002.gif at 01CEBE8A.FEA05DD0]"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<mailto:Karsten.Ernst at fhp-ww.com>>
To:
> "sap-wug at mit.edu<mailto:sap-wug at mit.edu>"
> <sap-wug at mit.edu<mailto: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<mailto: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<mailto: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<mailto: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
--
Kjetil Kilhavn / Vettug AS (http://www.vettug.no)
More information about the SAP-WUG
mailing list