2005 Sep 14 8:39 AM
Hi There
I got stuck with the following problem:
I implemented a workitem user exit and managed to determine the actual agent of a workitem at the "after_execution" event from the workitem container.
How can I read the users that are assigned in the workflow definition (e.g. via orgunit, position, multiline container element) to a workitem (or more correctly step)? This should of course be done after or just before creation of the workitem.
Any idea is highly appreciated!
Cheers, Michael
Hi There
I got stuck with the following problem:
I implemented a workitem user exit and managed to determine the actual agent of a workitem at the "after_execution" event from the workitem container.
How can I read the users that are assigned in the workflow definition (e.g. via orgunit, position, multiline container element) to a workitem (or more correctly step)? This should of course be done after or just before creation of the workitem.
Any idea is highly appreciated!
Cheers, Michael
2005 Sep 14 11:37 AM
Hi Michael,
Welcome to the ABAP forum!!
If your intention is to get all the selected agents of the Workitem, you can use the SAP_WAPI_WORKITEM_RECIPIENTS function module if it is available in your release. This FM does not work for completed WIs. Since WI id is the required parameter, you should call it after WI creation.
Cheers,
Ramki Maley.
Please reward points if the answer is helpful.
For info on awarding points click on this link: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
2005 Sep 14 12:33 PM
Hi Ramki
Thanks for the welcome, yes it was indeed my first post...don't know why I never posted workflow stuff here yet.
FM works well, but only if the workitem is stored after creation. When processing the state "after_creation" in the exit, there is already a workitem ID for the step/ task, but you can't read anything from the database - so the result of the FM is always empty. The next state in the exit is processed when the/one user executes the wi for the first time. At that time its too late to retrieve the assigned agents.
But thank you very much anyhow!
Cheers, Michael
2005 Sep 14 1:53 PM
Michael,
Sorry the FM does not work for you. Can you let me know the enhancement (SMOD) id for the exit you are using?
If you are interested, Method SWF_RUN_WIM_CRT_INTERNAL~GET_AGENTS_FOR_WORKITEM in class CL_SWF_RUN_WIM_LOCAL is where the agents are determined.
Cheers,
Ramki Maley.
2005 Sep 14 2:37 PM
Hi
No worries, the FM DOES help, even if not in exactly that context.
There is no entry in SMOD for this exit. You'll find it on a tab at every workflow step (called "program exit"). BUT: You'll need a WAS, means Basis System of 6.20 minimum!
Thanks for the method, but it seems to have no return parameter----how can I get the result???
Thanks again!
Michael
2005 Sep 14 3:51 PM
I am not sure if the method can be used in a custom program context.
Cheers,
Ramki Maley.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |