Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

Worklow - Double work items

Former Member
0 Kudos


I have created a work flow which is triggered based on two events.

1.) BUS2038.CLOSED &

2.) BUS2007.TECO

BUS2007.TECO is a customer created event and attached to status 'Technically somplete' of a PM Order. This is acheived via BSVW transaction. Workflow can be trigerred by any of these events.

It works fine if any one of the event is raised but if a PM order is being set to technically complete (Via Txn IW32) a pop up is diplayed which have an checkbox to close notification. On checking this checkbox both the events are simultaneously raised.

I have tried using an check funuction module and also putting an start condition via SWB_COND but it doesn't work as both the events are raised within a fraction of milliseconds.

Has anyone come across this situation earlier? Is there any way to stop triggering of one of the events? Or if there is any way of grouping the events so that any event within the group only sends one work item?

Any help would be greatly appreciated.

Thanks in advance,



Active Contributor
0 Kudos

Is it possible that a Notification can be closed with the associated order being still open? If not, your workflow should trigger off the first event that will occur. In this case this would be BUS2007.TECO. I am curious, is the order always TECOd first? Isn't it possible the order could also be business completed?

You could also try to extend BUS2038 with the order status attribute and use it in your start condition.


Ramki Maley.

0 Kudos

Thanks Ramki. Order can also be Business Completed first.

The four scenarios that can happen are.

1.) Only Notification is closed via IW22.

2.) Only Order is TECO'd but Notification is already closed.

3.) PM Order is TECO'd without checking the NOtification closed checkbox. So this only tehcnically complete the order.

4.) PM order is Teco'd and Notification is closed at the same time.

The current workflow works fine in first three casees but fails in the last one and sends 2 work items to the user inbox.

I had tried extending the objects BUS2038 & BUS2007 with the status. But the problem is in the fourth scenario both events are raised simultaneously and by that time neither order nor Notification status is updated to database.



0 Kudos


You probably can resolve this situation by activating the Event Queue for BUS2038.CLOSED (Txn SWETYPV) thereby delaying the start of workflow for this event. You must schedule the event queue job to run at a reasonable frequency using transaction SWEQADM to deliver these events. You should still have the start condition based on the order status for this event.


Ramki Maley.

Please reward points if the answer is helpful.

For info on awarding points click on this link:

0 Kudos


Thanks very much. Looks pretty close to me. I would try this first and if I am able to solve the problem then I would definately reward you points.