<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:m="http://schemas.microsoft.com/office/2004/12/omml" 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 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@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:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.l1s33, li.l1s33, div.l1s33
        {mso-style-name:l1s33;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:#4DA619;}
p.l1s52, li.l1s52, div.l1s52
        {mso-style-name:l1s52;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:blue;}
span.l1s521
        {mso-style-name:l1s521;
        font-family:"Courier New";
        color:blue;
        background:white;}
span.l1s331
        {mso-style-name:l1s331;
        font-family:"Courier New";
        color:#4DA619;
        background:white;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hello Tom, <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I&#8217;m a little confused. Are you expecting this attribute to be
available in a later step? <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>If so, perhaps you misunderstand instance management. Workflow
calls FIND_BY_LPOR to get an instance, does its thing and ditches it. Anything
not stored in the database (or a static attribute) is lost. Next step it will
call FIND_BY_LPOR again to get a new instance. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Either you need to implement a more sophisticated instance
management (a good idea for performance reasons) or you need to populate your
attribute in the constructor &#8211; probably both. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Other alternatives are to bind the attribute back into a
container element, or look at using a functional method (my preferred option). <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Cheers, <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Mike<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> sap-wug-bounces@mit.edu
[mailto:sap-wug-bounces@mit.edu] <b>On Behalf Of </b>Simon, Tom<br>
<b>Sent:</b> 21 January 2009 19:22<br>
<b>To:</b> sap-wug@mit.edu<br>
<b>Subject:</b> ABAP OO Workflow<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Florin:</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
So this is what I understand: When I tested my task I entered the key
attributes into the variable that represents&nbsp;my class.&nbsp; This object
reference is bound to the wi_Object_ID.&nbsp; The persistent
object&nbsp;reference &nbsp;is passed to find_by_lpor and the constructor is
executed to create the instance of the class.&nbsp; My instance method then
executes.&nbsp; As part of this execution I fill the me-&gt;zanek table with
the results from the function module.&nbsp; I then use&nbsp;
me-&gt;zanek&nbsp;in another method.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>When
the task is complete and I look at the workflow log,
&nbsp;the&nbsp;wi_object_ID, containing the&nbsp;instant object of the class
has the key attribute filled but not the table&nbsp;zanek.&nbsp; In
the&nbsp;method I changed the value of the key attribute belnr and it showed up
in the container reference to the class instance.&nbsp;&nbsp;So as the task
completed and executed&nbsp;my method it must of called bi_persistent-lpor and
updated the result parameter with my new value for me-&gt;belnr.&nbsp; It then
ran find_by_lpor and created&nbsp;a new&nbsp;instance with&nbsp;a different
value in the key parameter and passed it back to the&nbsp;wi_Object_ID
reference in the container.&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Thank
you,</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Tom
Simon</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp; <span class=l1s521><span style='font-size:10.0pt'>METHOD</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'>&nbsp;retrieve_anek.<br>
<br>
&nbsp;&nbsp;</span><span class=l1s521><span style='font-size:10.0pt'>CALL</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'>&nbsp;</span><span
class=l1s521><span style='font-size:10.0pt'>FUNCTION</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'>&nbsp;</span><span
class=l1s331><span style='font-size:10.0pt'>'ANEK_READ_MULITPLE'</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span class=l1s521><span style='font-size:10.0pt'>EXPORTING</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i_belnr&nbsp;=&nbsp;me-&gt;belnr<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i_bukrs&nbsp;=&nbsp;me-&gt;bukrs<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span class=l1s521><span style='font-size:10.0pt'>TABLES</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t_anek&nbsp;&nbsp;=&nbsp;me-&gt;zanek.<br>
<br>
&nbsp;&nbsp;&nbsp;</span><span class=l1s521><span style='font-size:10.0pt'>IF</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'>&nbsp;me-&gt;zanek&nbsp;</span><span
class=l1s521><span style='font-size:10.0pt'>is</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'>&nbsp;</span><span
class=l1s521><span style='font-size:10.0pt'>not</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'>&nbsp;</span><span
class=l1s521><span style='font-size:10.0pt'>initial</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'>.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;me-&gt;updatelink(<br>
&nbsp;&nbsp;&nbsp;&nbsp;im_archiveid&nbsp;=&nbsp;im_archiveid<br>
&nbsp;&nbsp;&nbsp;&nbsp;im_archdocid&nbsp;=&nbsp;im_archdocid<br>
&nbsp;&nbsp;&nbsp;&nbsp;im_object_id&nbsp;=&nbsp;im_object_id<br>
&nbsp;&nbsp;&nbsp;&nbsp;im_anek&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;ex_anek&nbsp;).<br>
<br>
&nbsp;&nbsp;&nbsp;</span><span class=l1s521><span style='font-size:10.0pt'>ENDIF</span></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black;background:white'>.</span>
<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:black;background:white'>&nbsp;&nbsp;&nbsp; me-&gt;belnr =
'4545454545454'.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:black;background:white'>endmethod.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

</div>

</div>

</body>

</html>