<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:Tahoma;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>Kris,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>It sounds like you want parallel approval
vs. line item based approval.&nbsp; What you described for level 1 approval
(send to FA1, FA2, FA3) is the same thing as if you determined multiple agents
for a task via any other method (role resolution, etc.).&nbsp; It is standard
for workflow to send it to all agents.&nbsp; The moment a first agent opens
task, the status is changed to reserved and workitem will disappear from other
agents inboxes.&nbsp; Also, when that agent approves or rejects, workitem
status will be changed to completed and it will continue on to the next defined
step.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>I don&#8217;t know if you can somehow fool
BADI that index has not changed until last person approves it at level 1.&nbsp;
You could set up FA1 as step 1, FA2 as step2, etc. but you loose efficiency in
throughput.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>You could copy or create your own
template with a fork with three branches for your FA approvals.&nbsp; Or, even
better you can use parallel dynamic fork to determine how many forks you will
need at runtime.&nbsp; You will most likely not be able to use BADI.&nbsp; If
you go with your own template with parallel branches, be sure to define agents
as a container with a reference to business object that is a subtype of AAGENT
(no need to do delegation).&nbsp; You would need to create a subtype of AAGENT
and then redefine method create to determine your agents.&nbsp; You will need
the following code at the end of method:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>&nbsp;&nbsp;&nbsp; CALL METHOD
object-private-ac_agent-&gt;agents_set<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPORTING<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
agents = lt_agents.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>&nbsp;&nbsp;&nbsp; CALL METHOD
object-private-ac_agent-&gt;serialize.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>&nbsp;&nbsp;&nbsp; swc_set_objectkey
object-private-ac_agent-&gt;a_id.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>Reason you have to use this approach is
to make it work with approval preview to take advantage of ad-hoc approvers,
etc.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>Hope this helps.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>Natasha<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Mark Pyc<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, June 22, 2007 6:16
AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">SAP Workflow
 Users' Group</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: N-step BADI approval
SRM workflow</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Why do they&nbsp;want to switch to header level approval&nbsp;if
they&nbsp;want the same functionality as item level???? <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>If they want Item Level approval functionality, then surely Item Level
approval should be the solution!?!?<br>
<br>
&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 6/22/07, <b><span style='font-weight:bold'>Kris</span></b>
&lt;<a href="mailto:kvenigalla@gmail.com">kvenigalla@gmail.com</a>&gt; wrote:</span></font></span>
<o:p></o:p></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Mark,<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>We are currently using the item level WF. It works fine for parallel
approval. But the customer wants to switch to header level approval but wants
the same functionality as item level. <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Even though i am detremining FA based on the cost assignment, the
header level WF sent the entire SC to FA approver. Only one workitem is sent
for both FA and MGMT approvers.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I may have to switch to sequential approvals. Let me know if you have
any other ideas.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Thanks<br>
<br>
&nbsp;<o:p></o:p></span></font></p>

</div>

<div><span id="q_1135384e124e38de_1">

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 6/22/07, <b><span style='font-weight:bold'>Mark Pyc</span></b>
&lt;<a href="mailto:mark.pyc@gmail.com" target="_blank">mark.pyc@gmail.com</a>&gt;
wrote: </span></font></span><o:p></o:p></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>G'day Venkat,<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>It sounds like you want to do Line-Item level approval. <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>At the Financial Analyst stage each approver is only responsible for
their lines items, at the Managerial stages the managers are resposnible for
all line items (note they will only see 1 workitem for approval). <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Is there&nbsp;a reason for not using the Line-Item approval technique?<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Have fun,<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Mark<br>
<br>
&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 6/22/07, <b><span style='font-weight:bold'>Kris</span></b>
&lt;<a href="mailto:kvenigalla@gmail.com" target="_blank"> kvenigalla@gmail.com
</a>&gt; wrote:</span></font></span> <o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi,<o:p></o:p></span></font></p>

</div>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>I am
implementing N-step approval badi for SC approval using header level workflow
(WS14000133) in SRM 5.0. My requirement is to determine the financial analysts
responsible for each line item and then the mangement approvers based on their
approval limits. Financial analyst need to approve the SC concurrently before
the management approvers receives the SC. I developed the code in the BADI to
populate the approval table. First time when the SC is created the approval
table looks as follows, <o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Index&nbsp;&nbsp;&nbsp;
Branch&nbsp;&nbsp;&nbsp; Approver<br>
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FA1<br>
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FA2<br>
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FA3<br>
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MGMT approver1<br>
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MGMT approver2<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>FA1, FA2
and FA3 recieves the SC. The approval preview looks great. Since this is not
item level workflow, FA will approve the SC at the header level.<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Here is
the Issue--<br>
When FA1, FA2 or FA3 approves the SC, the approval index is incremented by 1 in
the workflow, the SC is sent to MGMT approvers based on he index by skipping
all the FA approvers.<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>In this
scenario, how to develop logic to send the SC to MGMT approvers only after the
FA approvers approves it. I mean how to control the index and branching in
BADi. I am using header level workflow.<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Any
suggestion would be highly appreciated.<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Thanks<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Venkat<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>_______________________________________________<br>
SAP-WUG mailing list<br>
<a href="mailto:SAP-WUG@mit.edu" target="_blank">SAP-WUG@mit.edu </a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target="_blank">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><o:p></o:p></span></font></p>

</blockquote>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
<br>
_______________________________________________<br>
SAP-WUG mailing list<br>
<a href="mailto:SAP-WUG@mit.edu" target="_blank">SAP-WUG@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target="_blank">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
<o:p></o:p></span></font></p>

</div>

</span>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
_______________________________________________<br>
SAP-WUG mailing list<br>
<a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target="_blank">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>