cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow triggering twice

former_member182485
Active Contributor
0 Kudos

Hi,

I am have created a workflow for PO change I am using buisness object BUS2012 and event changed .

as start event everything work fine but workflow is triggering twice when PO is changed.

I observed the event trace and found chaging the PO trigger two changed event but secand one is for different BO ie, FREBUS2012.

How to solve this ?

Regards

Bikas

Accepted Solutions (1)

Accepted Solutions (1)

saumya_govil
Active Contributor
0 Kudos

Hi Bikas,

Is workflow having 2 triggering events one for BO BUS2012 and another for FREBUS2012?

Regards,

Saumya

former_member182485
Active Contributor
0 Kudos

Thanx for all your reply

@ Saumaya

Workflow is having only one triggering event only for BO BUS2012

@ Reddy

I have found two entry in SWEL that I have mentioned

@ Raj

I checked in SWE2 there is no entry with my WF

Looking forward for you reply

Regards

Bikas

saumya_govil
Active Contributor
0 Kudos

Hi Bikas,

Please check if there is an Output type that might be triggering the workflow based on the provided BO event.

This is another way the workflow can be triggered.

Regards,

Saumya

former_member193382
Active Contributor
0 Kudos

Hi,

When a PO is changed the events, BUS2012 - Changed & FREBUS2012 - Changed are triggered.

In SWE2 check if there is any other workflow linked to FREBUS2012 changed event and if its active?

If yes deactivate it.

Regards,

Raj

former_member182485
Active Contributor
0 Kudos

Hi Govil,

Can you please tell me more about the Output type.

Regards

Bikas

saumya_govil
Active Contributor
0 Kudos

Hi Bikas,

Output types are also used to trigger workflows, smart forms or to call methods.

It is a configuration done by functional person to link a BO event to a order or document.

You can find multiple help documents on the same. Try to ask the associated functional person for the details on the same.

I am not sure whether in your case an output type is the root cause but it is better to check for it.

Regards,

Saumya

Former Member
0 Kudos

Hi,

Why not try to see the PO whether there is output type is triggered?

Goto->Messages in transaction ME23N. Click on the communication method to see whether it triggers the workflow.

Regards,

Lim...

Former Member
0 Kudos

Hi,

Other way is to:

1. create the check function module.

2. Register this check function module in your even linkage table SWETYPV

Regards,

Lim...

Please follow this example, and change the check as you want.

FUNCTION Z00_CHECK_MATERIAL_GROUP.

*"----


""Local interface:

*" IMPORTING

*" VALUE(OBJTYPE) LIKE SWETYPECOU-OBJTYPE

*" VALUE(OBJKEY) LIKE SWEINSTCOU-OBJKEY

*" VALUE(EVENT) LIKE SWETYPECOU-EVENT

*" VALUE(RECTYPE) LIKE SWETYPECOU-RECTYPE

*" TABLES

*" EVENT_CONTAINER STRUCTURE SWCONT

*" EXCEPTIONS

*" OBJECT_NOT_FOUND

*" INVALID_MATERIAL_GROUP

*"----


DATA: OBJECT TYPE SWC_OBJECT.

DATA: MATGRP LIKE MARA-MATKL.

SWC_CREATE_OBJECT OBJECT OBJTYPE OBJKEY.

IF SY-SUBRC NE 0.

RAISE OBJECT_NOT_FOUND.

ENDIF.

  • read attribute 'MaterialGroup' from object

SWC_GET_PROPERTY OBJECT 'MaterialGroup' MATGRP.

IF SY-SUBRC NE 0.

RAISE OBJECT_NOT_FOUND.

ENDIF.

IF MATGRP NE '001'.

RAISE INVALID_MATERIAL_GROUP.

ENDIF.

ENDFUNCTION.

Former Member
0 Kudos

FREBUS2012 is the subtype of BS2012. To supress the FREBUS2012 . you need copy the HRPAD00_WF_CHECK_OBJTYPE to create an check function module. and then enter the check function module in event types linkage.

The FREBUS2012 will end with exceptions using swel to check.

Former Member
0 Kudos

I had the same issue and I've fixed it by adding a check function module as Ameko Chen suggested.

Answers (4)

Answers (4)

Former Member
0 Kudos

Is the same Workflow getting triggered twice or different?

Check for delegation of BUS2012?

Thanks

Arghadip

Former Member
0 Kudos

Hi,

Refer to OSS 797775. This would help you to resolve the issue.

Regards,

Dinesh

Former Member
0 Kudos

Hi;

The most probable cause of a workflow being started twice is that it is triggered by two separate mechanisms simultaneously.

For example if the flow is being triggered by an event, check that this event is only firing once. For example, you might find that it

has fired once due the customizing for change documents AND once due to the customizing of status changes. Transaction

SWUD will allow you to determine how many times the event is firing. If it is only firing once, check that the workflow is not

additionally being started directly by a program or customizing tables. Check that the workflow is not customized to trigger on two

separate events.

Regards

Shashi

former_member193382
Active Contributor
0 Kudos

Hi,

In SWE2/SWETYPV check event linkage for any workflow template linked to FREBUS2012 is active.

If yes just deactivate it.

let me know if you have any queries.

Regards,

Raj

Former Member
0 Kudos

Check out in SWEC. There would be an entry for FREBUS2012.

Run Event Trace in SWEL. you might find FREBUS2012 and QCYBUS2012.

I am not sure abt the removal of those entries..

Lets wait for Experts answer...

Regards,

PR.