Skip to Content
Former Member
May 05, 2017 at 09:59 AM

FM to add possible agents at runtime in workflow

3134 Views Last edit May 08, 2017 at 09:48 AM 2 rev

Hi experts,

We have requirement to restrict forwarding of workitem. I know we can achieve this by define possible agents in agent assignment of the task (General forwarding not allowed).

But our requirement is to fetch the possible agents from custom table at runtime dynamically. So, is there any FM or BAPI available to fill the possible agents dynamically instead of static assignment in the task. Or is there any other way to achieve this requirement.

We are trying to map custom workflow task to 'My inbox' fiori app. In this custom workflow, there is a functionality that it can be forwarded to only a particular group of users which is fetched from Z-table at runtime (company code wise)

Now, we require this functionality in the fiori app also. While R&D, we have restricted the users via possible agent option in the task(Task -> Extra -> Agent assignment -> Maintain -> Attributes -> General forwarding not allowed). In this option, we have assigned some test users. When we tried to use forward option in the fiori app, only the assigned users were allowed.

But it's a static restriction. we can assign possible agents before the execution of task and we have to assign all the users from all the company codes.

Our requirement is to assign possible agents(company code wise) at runtime to match our custom functionality in fiori app also. So, the forward functionality should work only for respected set of users per company code.

Is there any way to do so?

Thanks in advance.