cancel
Showing results for 
Search instead for 
Did you mean: 

Two Instance getting triggered on Change of PO for BUS2012

0 Kudos

Hello experts,

I have created a single step Workflow, to be triggered on change of PO.

I created a Subtype of BUS2012 and delegated it. added a new method to carry out the processing as required.

However on change there are two workflow instance in the SWIA, one completed and the other in Error state.

on examining the SWEL, for a change to PO, there are three entries for Change event.

1. BUS2012 - Changed event - No receiver entered

2. BUS2012 - Changed event - receiver found (My task)

3. FREBUS2012 - Changed event - receiver found ( My Task).

4. FREBUS2012 - event is CHANGEFRE - NO receiver entered.

I have created just one link in SWE2, however I am not able to figure it out why FREBUS2012 is getting a receiver.

Please help.

Regards,

Jibran

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Thanks you all for the replies.

The Issue is now resolved.

On Removing the entry for FREBUS2012 on Change from SWEC solved the issue, But I was not sure if deleting it would be the best choice, hence I restored it. Instead of this, I have defined a start Condition for the task thru SWB_COND,  In the condition I just checked the PO doc type and the Issue got resolved.

And now the Check FM fails for FREBUS2012 CHANGED event, and I have just One Entry in SWIA transaction per PO change.

Answers (4)

Answers (4)

I042439
Employee
Employee
0 Kudos

Hi Jibran

Check the delegations, there surely would be a delegation between BUS2012 and FREBUS2012 in SWO1.

I am not sure of why this happens, maybe some config related to funct settings. I faced this once and I resolved it via a check function module between BUS2012 and event CHANGED in SWE2.

This is what i Wrote in the check function module:

* Check if the CHANGED Event is triggered

  IF event = lvc_changed_event. " 'CHANGED'

    SORT event_container BY element value.

*   Read the container value to get actual Object Type

    READ TABLE event_container INTO     ls_container

                               WITH KEY element = '_EVT_OBJTYPE'

                                        value   = 'FREBUS2012' "Check for FREBUS2012 Object Type

                               BINARY SEARCH.

*   Raise an exception if the CHANGED event is from FREBUS2012

    IF sy-subrc = 0.

      RAISE frebus2012_changed_triggered.

    ENDIF.

  ENDIF.

So this will not let your WF start with FREBUS2012 CHANGED...... if you look for OBJTYPE in the check FM, it will still contain BUS2012....real object type is hidden in _EVT_OBJTYPE.

Regards,

Modak

bpawanchand
Active Contributor
0 Kudos

Hi,

I would recommend to make use of RECEIVER TYPE function module  in the SWE2 transaction to include in the event linkage and make sure you dynamically assign the receiver type from within the function module. This makes you to avoid other workflows to be triggered or MAke use of Event condition from basic data of workflow under start events.

To get more idea check function group. SWE_TEMPLATE to know how receiver type function module works.

Regards

Pavan

Former Member
0 Kudos

Hi Jib,

Check in SWEC, is there any change documents are entered for BO FREBUS2012 , and remove it.

Regards,

Murali Krishna.

0 Kudos
0 Kudos

Thank You Tommy,

yes, in SWEC there is a linkage maintained for FREBUS2012, but I am not sure if I should delete the entry, as may be it is being used by some other object or config.

do you have any information regarding how I can check if any object will it effect if I delete this linkage.

0 Kudos

If the linkage is to your workflow, then just remove it.  That wont affect anything else.