on 02-21-2011 8:55 AM
Hello.
I'm looking for a way in ABAP to create a list of users as a result of what's entered in Agent Assignment for a task group.
The only things I've found is dynpros displaying a list like that (SWU_WF_TASK_DISPATCH).
I need something like SWD_API_POSSIBLE_AGENTS_GET and RH_AGENTS_OF_TASK_GET but couldn't figure out how to use it.
If there is no way to read the assignments of a task group, then I think it would work to read what users belongs to a role.
Same thing there. I can only find BAPIs to read what role a user have, not the other way around.
Any hints would be great!
/Mikael
Hi Mikael,
You can use these function modules in a rule to get the required agents for a task. And then specify that rule in agent assignment category.
Regards,
Guddan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick reply.
I can see the TaskGroup in tx PFTC and also get a list with corresponding users.
The thing is that I'm trying to build a FM that return possible agents from a TaskGroup. I don't want to change the assignment to the task.
I'd rather use a TaskGroup as inputparameter and to get a list of users to choose from.
This is because the list will be avalible for the end users to select from, and the selection will be used by the workflow to assign next agent in the workflow.
So the agent assignment will actually be done by the user, and then set in coding in the workflow.
To avoid the use of un-selectable agents, I'd like to create a list (or f4-help) for the user.
Do you have any coding-examples? I can't get it to work with the FM's above.
Perhaps an easy error. However I only get the currently assigned agent, or an empty list.
Hello again.
I managed to do this in coding by first calling RH_PBUILD_WORKFLOW with eval_path 'SAP_TAGT' and then call FM RH_BRANCH_GET (using WEGID = EV_MOD_EV from RH_PBUILD_WORKFLOW).
So this call gives me a list with all possible users to a taskgroup, however the call takes a lot of time (allmost 4 minutes).
Is there a trick to speed things up a bit?
code listing:
DATA: lv_evaluation_path LIKE GDSTR-WEGID.
lv_evaluation_path = 'SAP_TAGT'.
CALL FUNCTION 'RH_PBUILD_WORKFLOW'
EXPORTING
IV_EVALUATION_PATH = lv_evaluation_path
* IT_EVAL_PATH =
IMPORTING
EV_MOD_EV = lv_evaluation_path
* EV_IS_INTERNAL =
.
CALL FUNCTION 'RH_BRANCH_GET'
EXPORTING
root_plvar = root_plvar
root_otype = root_otype
root_objid = root_objid
ACT_WEGID = lv_evaluation_path
ACT_INT_WEGID = 'X'
* ACT_LEVEL = 1
* ACT_SVECT = '1'
ACT_TDEPTH = ACT_TDEPTH
* ACT_BEGDA = SY-DATUM
* ACT_ENDDA = '99991231'
* ROOT_IN_NODE_TAB =
* ACT_ACTIV =
* TEXT_BUFFER_FILL =
* GIVEN_GDSTR =
* USE_GIVEN_GDSTR =
tables
node_tab = node_tab
.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.