<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> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I’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> </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 – 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> </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> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </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> </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"'>
So this is what I understand: When I tested my task I entered the key
attributes into the variable that represents my class. This object
reference is bound to the wi_Object_ID. The persistent
object reference is passed to find_by_lpor and the constructor is
executed to create the instance of the class. My instance method then
executes. As part of this execution I fill the me->zanek table with
the results from the function module. I then use
me->zanek 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,
the wi_object_ID, containing the instant object of the class
has the key attribute filled but not the table zanek. In
the method I changed the value of the key attribute belnr and it showed up
in the container reference to the class instance. So as the task
completed and executed my method it must of called bi_persistent-lpor and
updated the result parameter with my new value for me->belnr. It then
ran find_by_lpor and created a new instance with a different
value in the key parameter and passed it back to the wi_Object_ID
reference in the container. </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <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> <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> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <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'> retrieve_anek.<br>
<br>
</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'> </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'> </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>
</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>
i_belnr = me->belnr<br>
i_bukrs = me->bukrs<br>
</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>
t_anek = me->zanek.<br>
<br>
</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'> me->zanek </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'> </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'> </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>
me->updatelink(<br>
im_archiveid = im_archiveid<br>
im_archdocid = im_archdocid<br>
im_object_id = im_object_id<br>
im_anek = ex_anek ).<br>
<br>
</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> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:black;background:white'> me->belnr =
'4545454545454'.</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <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> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>