cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding duplicate workitem

Former Member
0 Kudos

Hi All,

I have searched every possible thread regarding duplicate WI but none has given a clear answer.

Issue is : Employee creates a travel request. A workitem is created in manager's inbox. when the employee edits the request, another workitem gets created.

How can I prevent creation of duplicate workitems?

I have a fork with two branches. One branch waits for event change of request while the other sends the request for manager's approval.

End condition of fork is till the request is either approved or rejected by the manager. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If an employee changes travel request, the current workflow instance should be terminated and a new workflow instance gets created. Otherwise, the manager could approve something that s/he didn't see. You can achieve this by either using terminating events (the approval step is terminated automatically if the employee changes the travel request) or by using a fork that will terminate the workflow upon receiving an event indicating change of travel request.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

You can create a virtual attribute that uses SAP_WAPI_WORKITEMS_TO_OBJECT function module to check whether there is a already existing workflow and use that in start condition of workflow SWB_cond to trigger workflow.

Thanks

Arghadip

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can use the WAPIs if you are doing this programmatically... but in this case I would strongly agree with Abdullah - a terminating event based on the travel request object would be much cleaner and simpler. 

rajesh_akarte2
Active Participant
0 Kudos

Hi,

User should be able to edit the document only when it is not approved.

If document is not approved and user is editing the document then should put a condition before raising the event for WF.

If document is created first time then only it should trigger the WF.

anjan_paul
Active Contributor
0 Kudos

Hi,

  It is standard functionality , you can't stopped them from creating another workitem. 

What is your requirement actually. share your workflow design