Showing results for 
Search instead for 
Did you mean: 

Limit workflow object instances

Former Member
0 Kudos

hi gurus,

apologies if this is a common question, I searched but found no answers, so perhaps it is not...

I want to limit the number of times a workflow can be started for an object.... example, I have a workflow for our material master creation process which is started manually. If there is an instance of the workflow in process for given material I do not want another user to be able to manually start it again for that same material.

Any clue on how to do this?

many thanks,


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


IF you are using an event to start the workflow, get familiar with check function modules. You can define a check function module in transaction SWETYPV. In the function you can have some coding which checks if there is already an instance running for the same object, and if it is, then raise exception. => Event will not start workflow. This is a very common approach.

If you are starting the workflow without event, then I would investigate the place where you start the workflow and basically add the same code (as in above solution) before the WF triggering code. If it is standard code and you don't want to modify it, you can add an additional step into the workflow (in the beginning) which will check (again use the same code) whether there is an older instance running, and if there is, cancel the ongoing workflow.

How to find if there is an workflow for an object? Answer: Function SAP_WAPIWORKITEMTO*OBJECT (or something like that).



Answers (0)