<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial size=2><FONT face=Arial size=2><SPAN 
class=957200612-25042008>Hi All,</SPAN></FONT></DIV>
<DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=957200612-25042008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=957200612-25042008>I'm new to this 
group (and workflow), but was wondering if anyone can tell me if there's any 
standard functionality to determine all possible agents for a task, or if not 
advise on the best way to&nbsp;provide this. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=957200612-25042008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=957200612-25042008>I have a bespoke 
Expense Approval workflow&nbsp;sending reminder emails via a send mail 
step.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=957200612-25042008>The agent for the 
task is determined programmatically within&nbsp;the workflow, held in a 
container&nbsp;defined as the agent against the task. </SPAN></FONT><FONT 
face=Arial size=2><SPAN class=957200612-25042008>There's also an excluded agent 
(the employee whose expense&nbsp;claim is being processed)!</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=957200612-25042008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=957200612-25042008>The requirement is 
for the reminder mail to be sent to the agent as currently, and the same mail to 
go to all personal substitutes of the agent, but&nbsp;no mail for&nbsp;any 
excluded agents of the task.&nbsp;</SPAN></FONT></DIV>
<DIV><FONT size=+0><SPAN class=957200612-25042008><SPAN 
class=957200612-25042008></SPAN><SPAN class=957200612-25042008><SPAN 
class=957200612-25042008></SPAN><SPAN 
class=957200612-25042008></SPAN>&nbsp;</DIV>
<DIV>
<DIV>
<DIV><FONT face=Arial size=2><SPAN class=957200612-25042008>I've found 
substitutions are maintained in table HRUS_D2, and this table is interrogated 
when a user logs on to determine their worklist. I've also&nbsp;found 
FM&nbsp;SAP_WAPI_SUBSTITUTES_GET which accepts an Agent and returns all entries 
from HRUS-D2.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=957200612-25042008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=957200612-25042008>My thoughts so far 
are to write a wrapper round SAP_WAPI_SUBSTITUTES_GET which will handle the 
appropriate profiles, substitution validity periods, active flag etc.&nbsp;then 
to&nbsp;incorporate this FM in a method for use in the WF.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=957200612-25042008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=957200612-25042008>Would this be a 
sensible approach, any advice would be appreciated,</SPAN></FONT></DIV><SPAN 
class=957200612-25042008>
<DIV><BR><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN 
class=957200612-25042008>Carol</SPAN></FONT></FONT></DIV></SPAN></SPAN></DIV></SPAN></FONT></DIV></FONT></DIV></BODY></HTML>