cancel
Showing results for 
Search instead for 
Did you mean: 

Priority of a workitem

Former Member
0 Kudos

Hi ,

I am currently working on 4.6C system.

My requirement is to dynamically change the priority of the workitem which will be created next. Based on certain conditions I need to change the priority of the next step whose workitem will be created subsequently.

Regards,

Vin

Accepted Solutions (0)

Answers (2)

Answers (2)

ramki_maley
Active Contributor
0 Kudos

Hi Vin,

If your need is to have the workitem created as Express (priority 1) or non-express, the simplest way is to have a condition step and create an express WI when the condition is true in one branch and a normal wi in the other branch. This way the agents will get the express notification popup.

Cheers,

Ramki Maley.

Former Member
0 Kudos

Please check the documentation of FM "SWW_WI_PRIORITY_CHANGE" .

Before executing task, create background task to call this FM and change the priority.

Regards

Aman

Former Member
0 Kudos

Hi,

SWW_WI_PRIORITY_CHANGE works ok, too, but I'd recommend you to use SAP_WAPI_CHANGE_WORKITEM_PRIO because it's the 'official' interface to workflow and should keep you out of trouble during upgrades.

But please check Ramki's comment first if that suits you better.

Regards,

Mikko

Former Member
0 Kudos

Hi,

Thanks for all the replies!

I can not use the function module SWW_WI_PRIORITY_CHANGE or SAP_WAPI_CHANGE_WORKITEM_PRIO as the FM requires the workitem id as an import parameter. In my case the workitem has not been created so I do not have workitem id to pass. My requirement is to assign/change the priority of the workitem which will be created subsequently, from the previous step in the workflow.

Ramki's suggestion can be implemented. In my case I want to change the priority of a decision step which is responsible for making workflow divided in two different legs. So I will have to make a copy of the decision step with different priority value to implement the change required. I would be happy if I could achieve it by passing parameters instead of making a copy of a step. Not sure if it is possible.

Regards,

Vin

Former Member
0 Kudos

Hi Vinayak,

Sorry I read your message a bit too fast there.. The dynamic passing of the priority parameter from the wf container to the task container isn't possible as you expected because the binding isn't allowed.

I agree with Ramki that the simplest way is to use a condition or a multiple condition and then define the priority on step level.

The only way I think in which you could somehow pass it dynamically is to first bind the required priority value to the task container and then develop a batch run which would update the work item priority with the value found from its container. But I wouldn't really like to go that way myself because of the poor performance and overhead.

And the other would be to enter the priority update logic to the method so that the first time the user executes the task, the priority is changed. But that's not either solving your problem fully..

Have you found anything in OSS for this?

-Mikko