<html><div style='background-color:'><DIV class=RTE>
<P>Hi Rick,</P>
<P>I would create a view that joins the list of PLANT users with the AGR_USERS table specifying the the role id that gives that particular authorization (AGR_USERS-AGR_NAME).</P>
<P>Once you get such a list, what will you do with it? You say you want to send it to all of the people on the list. You could do that with dynamic work item generation, but then all the users get their own work item, not a shared work item.</P>
<P>Another way would be to create a rule using a function module wrapper around the selection logic from the above view and then use the rule for agent determination. That way it is a common/shared work item and the first one who gets it owns it and it is removed from all other inboxes.</P>
<P>Hope this helps.</P>
<P>Ed Diehl</P>
<P><BR><BR></P></DIV>
<DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>
<DIV></DIV>From: <I>"Rick Sample" <Rick.Sample@gbe.com></I><BR>Reply-To: <I>"SAP Workflow Users' Group" <sap-wug@mit.edu></I><BR>To: <I>sap-wug@mit.edu</I><BR>Subject: <I>Route by Security question</I><BR>Date: <I>Wed, 05 Jul 2006 10:36:16 -0500</I><BR>>I have a task where the only practical way to find an agent is to send<BR>>to all users in a PLANT with a specific Security Auth.<BR>><BR>>Any existing FM to get a "List" of users for a specific security auth?<BR>><BR>><BR>>I can get a list of users in a PLANT, and then loop through that list<BR>>using AUTHORITY_CHECK to determine but I would think their is an<BR>>existing more elegant approach.<BR>><BR>>4.6c<BR>><BR>>TIA,<BR>>Rick Sample<BR>>SAP Workflow Analyst/Developer<BR>>Graybar,
Inc.<BR>><BR>><BR>>_______________________________________________<BR>>SAP-WUG mailing list<BR>>SAP-WUG@mit.edu<BR>>http://mailman.mit.edu/mailman/listinfo/sap-wug<BR></FONT></BLOCKQUOTE></div></html>