<html 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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Times New Roman",serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-AU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hi Sue, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Moving to HEC shouldn’t change anything… unless there were transports involved and some macro definitions were lost? &nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Did you also change NetWeaver releases at the same time? I recall some mention of HANA.. ?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Rgds<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Jocelyn <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">&lt;sap-wug-bounces@mit.edu&gt; on behalf of Susan Keohan &lt;keohan@ll.mit.edu&gt;<br>
<b>Reply-To: </b>SAP Group &lt;sap-wug@mit.edu&gt;<br>
<b>Date: </b>Thursday, 10 May 2018 at 3:38 am<br>
<b>To: </b>SAP Group &lt;sap-wug@mit.edu&gt;<br>
<b>Subject: </b>Old one (BUS2081/cross fiscal years)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal"><a name="_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Hi Wuggers,</span><o:p></o:p></a></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">I have two custom workflows that send invoices out for approvals.&nbsp; When these workflows are started, they update a text field
 on the invoice using BAPI_INCOMINGINVOICE_GETDETAIL and BAPI_INCOMINGINVOICE_CHANGE.&nbsp; &nbsp;The same calls are done to update the invoice again after approval (updating only the text field).</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">These two workflows, BTW, have been running for 14 years.&nbsp; The method to update the invoice was updated in 2008 when the above
 BAPIs were released for customer use.</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">At some point, we recognized that we needed to handle invoices that are in process by workflow when the FY changed.&nbsp; No problem!&nbsp;
 The BAPI_INCOMINGINVOICE_CHANGE nicely returns <b>invoicedocnumber_new</b> and <b>
fiscalyear_new</b> if the old invoice was deleted and a new one created in the background.&nbsp; I capture those new values and pass them back into the object method, where I check for a new invoice/fiscal year and execute some macros (remember them???)</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;;color:black">IF NOT new_invoice IS INITIAL.&nbsp; &quot;We have a new invoice doc</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;;color:black">&nbsp; CONCATENATE new_invoice new_year INTO new_key.</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;;color:black">&nbsp; swc_free_object self.</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;;color:black">&nbsp; swc_set_objectkey new_key.</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;;color:blue">* new object reference</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;;color:black">&nbsp; swc_create_object self 'BUS2081' new_key.</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;;color:black">&nbsp; swc_refresh_object self.</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;;color:black">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;;color:black">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif;color:black">This methodology worked ~most~ of the time.&nbsp; Once in a while, one of the workflows would fail on subsequent steps
 because the new invoice doc number and fiscal year somehow were not returned in the container.</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif;color:black">Since it didn’t cause anyone except the lowly WF Admin any pain, nobody saw the need to change it!&nbsp; (I can hear
 Jocelyn talking to me about this…)</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif;color:black">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif;color:black">Now we’ve completed an upgrade to HEC, and noticed some quirks… BAPI_INCOMINGINVOICE_GETDETAIL doesn’t always return
 the accountingdata sorted by serial number, which makes the BAPI_INCOMINGINVOICE_CHANGE throw up (error M8 367).&nbsp; I’ve added a sort on accountingdata between them, and that problem goes away…</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif;color:black">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif;color:black">But now the WFs are all erroring out on Fiscal Year changes – in QA, and only because I made people test ‘pre-HANA’
 invoices (smiley face).&nbsp;&nbsp; When I debug the method in the BOR, the BAPI still returns the
<b>invoicedocnumber_new</b> and <b>fiscalyear_new</b>, but my trusty macros are not updating the main object of the WF.</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif;color:black">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif;color:black">&nbsp;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Sure would appreciate any insights you can share.&nbsp; And bear in mind, this stuff is O-L-D…</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">Thanks,<br>
Sue</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;</span><o:p></o:p></span></p>
</div>
</body>
</html>