<div dir="ltr"><div>G&#39;day Loren,</div><div> </div><div>GET_ELEMENT is really just a READ TABLE statement. So 8 means the entry wasn&#39;t found in the table (the container is really just an internal table). You are correct. If you haven&#39;t bound it, at run time it won&#39;t be in the container. Inbound containers only have entries that are bound to them, and not an entry for every element specified at design time. And yes, the test tools will load all elements with an initial value if nothing else specified.</div>
<div> </div><div>Agree that the set of &#39;USEEXCEPTIONS&#39; on the basis of NoCommit not being passed looks like a bug, but since in the PO WF I always want exceptions and explicitly bind an &#39;X&#39; I&#39;ve never noticed. </div>
<div> </div><div>Have fun,</div><div>Mark</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 12 December 2013 09:13, Bratzler, Loren <span dir="ltr">&lt;<a href="mailto:loren.bratzler@nscorp.com" target="_blank">loren.bratzler@nscorp.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" vlink="purple" link="blue"><div><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">Mark,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">Thank you for pointing this out.  I changed my message number to 001 and I am now getting my warning messages!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><img width="785" height="301" src="cid:image005.png@01CEF691.F62713D0"></span><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">And to Rick’s point about debugging the method:  I did that and I noticed some odd behavior in our Purchase Order workflow (BUS2012).  The BAPI that is used to release the PO has a parameter that basically tells the BAPI if any exceptions are going to be raised:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span><span style="font-size:10pt">CALL FUNCTION </span></span><span><span style="font-size:10pt">&#39;BAPI_PO_RELEASE&#39;</span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
  </span><span><span style="font-size:10pt">EXPORTING</span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>    <span style="background:yellow">use_exceptions         </span></span><span><span style="background:yellow;font-size:10pt">= </span></span><span style="background:yellow;font-family:&quot;Courier New&quot;;font-size:10pt">useexceptions</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
    po_rel_code            </span><span><span style="font-size:10pt">= </span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">relcode<br>    no_commit              </span><span><span style="font-size:10pt">= </span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">nocommit<br>
    purchaseorder          </span><span><span style="font-size:10pt">= </span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">object</span><span><span style="font-size:10pt">-</span></span><span><span style="font-size:10pt">key</span></span><span><span style="font-size:10pt">-</span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">purchaseorder<br>
  </span><span><span style="font-size:10pt">IMPORTING...<u></u><u></u></span></span></p><p class="MsoNormal"><span><span style="font-size:10pt"><u></u> <u></u></span></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">If this parameter is not populated with an “X”, the BAPI will not raise any exceptions at all.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">I then saw this code at the beginning of the PO Release method:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">swc_get_element container </span><span><span style="font-size:10pt">&#39;RelCode&#39; </span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">relcode</span><span><span style="font-size:10pt">.</span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
swc_get_element container </span><span><span style="font-size:10pt">&#39;UseExceptions&#39; </span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">useexceptions</span><span><span style="font-size:10pt">.</span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
swc_get_element container </span><span><span style="font-size:10pt">&#39;NoCommit&#39; </span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">nocommit</span><span><span style="font-size:10pt">.</span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
</span><span><span style="font-size:10pt">IF </span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">sy</span><span><span style="font-size:10pt">-</span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">subrc &lt;&gt; </span><span><span style="font-size:10pt">0</span></span><span><span style="font-size:10pt">.</span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
  </span><span><span style="font-size:10pt">MOVE </span></span><span><span style="font-size:10pt">&#39;X&#39; </span></span><span><span style="font-size:10pt">TO </span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">useexceptions</span><span><span style="font-size:10pt">.</span></span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
</span><span><span style="font-size:10pt">ENDIF</span></span><span><span style="font-size:10pt">.</span></span><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">During debugging, I noticed that the first GET_ELEMENT command got a return-code of zero.  But the next two both got return-codes of 0008.  Looking at the bindings, I could see that we were passing the workflow container elements to the task container, but the workflow container elements were never populated anywhere in the workflow.  </span><b><span style="color:red;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">What is the criteria for when a GET_ELEMENT command will return a SY-SUBRC of 0008?</span></b><span style="color:red;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">  </span><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">What I found interesting was that if I tested the BOR method stand-alone through SWO1, these GET_ELEMENT commands always got return codes of zero, even though I did not key anything into the importing fields on the test screen.  They only got return-codes of 0008 when running in the workflow itself.  So is it possible that the SWO1 test screen was populating these fields with spaces which was accepted?  And then when running in the workflow they were INITIAL which caused the return-code 0008?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt">The other thing I notice here is that the check of SY-SUBRC is after the GET of the NoCommit parameter but it is populating the UseExceptions parameter if sy-subr is not zero.  That looks to me like an error in the code and this code came from the standard RELEASE method of BUS2012.  I think the only reason we have been getting any exceptions at all from this process is because we just happened to not populate the NoCommit parameter which caused SY-SUBRC to be 0008 which then caused us to move the “X” to the UseExceptions variable.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:blue;font-family:&quot;Comic Sans MS&quot;;font-size:10pt">Loren </span><span style="color:gray;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;font-size:10pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:gray;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;font-size:10pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;font-size:10pt">From:</span></b><span style="font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;font-size:10pt"> <a href="mailto:sap-wug-bounces@mit.edu" target="_blank">sap-wug-bounces@mit.edu</a> [mailto:<a href="mailto:sap-wug-bounces@mit.edu" target="_blank">sap-wug-bounces@mit.edu</a>] <b>On Behalf Of </b>Mark Pyc<br>
<b>Sent:</b> Tuesday, December 10, 2013 5:38 PM</span><div class="im"><br><b>To:</b> SAP Workflow Users&#39; Group<br></div><b>Subject:</b> Re: Temporary Exception Message Not Showing Up in Workflow Log<u></u><u></u><p></p>
<div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">G&#39;day Loren,<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">An oldie, but a goldie!! <u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">SAP has some wonderful code that says if the message number is initial, don&#39;t include it in the log. Oh but wait, message 000 is a valid message number.... Too bad. Pick a different number.<u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">If you change to message ZWF_MSG 001 it&#39;ll work a treat.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div>
<p class="MsoNormal">Have fun,<u></u><u></u></p></div><div><p class="MsoNormal">Mark<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div></div><div><p class="MsoNormal" style="margin-bottom:12pt"><u></u> <u></u></p>
<div><p class="MsoNormal">On 11 December 2013 05:41, Bratzler, Loren &lt;<a href="mailto:loren.bratzler@nscorp.com" target="_blank">loren.bratzler@nscorp.com</a>&gt; wrote:<u></u><u></u></p><div><div><p class="MsoNormal">
<span style="color:rgb(31,73,125)">I feel like I’m asking an awful lot of questions here lately!  But here is another issue I am facing.  I spoke with Sue about this at TechEd and I have scoured SCN and the internet trying to find an answer but no luck so far.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">I have added a temporary exception to a BOR method when a user has the object locked.  On other workflows where we have a temporary exception, the workflow log shows a yellow warning indicator on the execution of the step that you can click on and get the temporary exception message:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"><img width="678" height="115" src="cid:image001.png@01CEF691.7B7ACFA0" border="0"></span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">If you click on the warning, you get a pop-up window that displays the message:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"><img width="432" height="140" src="cid:image002.png@01CEF691.7B7ACFA0" border="0"></span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">However, on the workflow where I just added the temporary exception, I do not get the warning message.  You can see in this example below, that the background task was executed twice by the retry program (RSWWERRE) before it finally completed but I did not get the warning messages:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><img width="680" height="149" src="cid:image003.png@01CEF691.7B7ACFA0" border="0"><u></u><u></u></p><p class="MsoNormal">
<span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">I have compared the two BOR methods (the one that works and the one that doesn’t work) and I believe I am doing everything correct.  They both have the exception defined as temporary:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><img width="656" height="205" src="cid:image004.png@01CEF691.7B7ACFA0" border="0"><u></u><u></u></p><p class="MsoNormal">
<span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">And the logic in the method is doing an EXIT_RETURN raising the temporary exception number:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt">* If there is only one error message and it is a user lock</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
</span><span style="font-size:10pt">* error (CJ-806), raise temporary exception 9001.</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>      </span><span style="font-size:10pt">IF </span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">lv_lines </span><span style="font-size:10pt">= 1.</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
        </span><span style="font-size:10pt">READ TABLE </span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">lt_result </span><span style="font-size:10pt">INDEX 1</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
              </span><span style="font-size:10pt">INTO </span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">ls_result</span><span style="font-size:10pt">.</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
        </span><span style="font-size:10pt">IF </span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">ls_result</span><span style="font-size:10pt">-</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">message_id     </span><span style="font-size:10pt">= &#39;CJ&#39; AND</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
           ls_result</span><span style="font-size:10pt">-</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">message_number </span><span style="font-size:10pt">= &#39;806&#39;.</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
          lv_msg1 </span><span style="font-size:10pt">= </span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">ls_result</span><span style="font-size:10pt">-</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">message_text</span><span style="font-size:10pt">.</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
          exit_return </span><span style="font-size:10pt">9001 </span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt">lv_msg1 space space space</span><span style="font-size:10pt">.</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>
        </span><span style="font-size:10pt">ENDIF.</span><span style="background:white;font-family:&quot;Courier New&quot;;font-size:10pt"><br>      </span><span style="font-size:10pt">ENDIF.</span><u></u><u></u></p><p class="MsoNormal">
<span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">Even though these changes were made strictly to the BOR Object, I also generated a new version of the workflow to see if that would make the messages start appearing in the log, but that did not work either.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">Anyone have any ideas on what I might be missing here?</span><u></u><u></u></p><p class="MsoNormal">
<span style="color:rgb(31,73,125)"> </span><u></u><u></u></p><div><p class="MsoNormal"><span style="color:blue;font-family:&quot;Comic Sans MS&quot;;font-size:10pt">Loren Bratzler</span><u></u><u></u></p><p class="MsoNormal">
<span style="color:gray;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;font-size:10pt">Norfolk Southern Corporation</span><u></u><u></u></p><p class="MsoNormal"><span style="color:gray;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;font-size:10pt">110 Franklin Road SE</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:gray;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;font-size:10pt">Roanoke, VA  24042-0060</span><u></u><u></u></p><p class="MsoNormal"><span style="color:gray;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;font-size:10pt"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:gray;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;font-size:10pt">Phone: <a href="tel:540-524-3072" target="_blank">540-524-3072</a></span><u></u><u></u></p><p class="MsoNormal">
<span style="color:gray;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;font-size:10pt">Email: <a href="mailto:loren.bratzler@nscorp.com" target="_blank">loren.bratzler@nscorp.com</a></span><u></u><u></u></p></div><p class="MsoNormal">
<span style="color:rgb(31,73,125)"> </span><u></u><u></u></p></div></div><p class="MsoNormal" style="margin-bottom:12pt"><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><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></p></div></div>
<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><br>
<br></blockquote></div><br></div>