<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:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" 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 12 (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]-->
<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;}
@font-face
        {font-family:Verdana;
        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
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.ecxmsonormal, li.ecxmsonormal, div.ecxmsonormal
        {mso-style-name:ecxmsonormal;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.ecxmsochpdefault, li.ecxmsochpdefault, div.ecxmsochpdefault
        {mso-style-name:ecxmsochpdefault;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.ecxmsohyperlink
        {mso-style-name:ecxmsohyperlink;}
span.ecxmsohyperlinkfollowed
        {mso-style-name:ecxmsohyperlinkfollowed;}
span.ecxemailstyle18
        {mso-style-name:ecxemailstyle18;}
p.ecxmsonormal1, li.ecxmsonormal1, div.ecxmsonormal1
        {mso-style-name:ecxmsonormal1;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.ecxmsohyperlink1
        {mso-style-name:ecxmsohyperlink1;
        color:blue;
        text-decoration:underline;}
span.ecxmsohyperlinkfollowed1
        {mso-style-name:ecxmsohyperlinkfollowed1;
        color:purple;
        text-decoration:underline;}
span.ecxemailstyle181
        {mso-style-name:ecxemailstyle181;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
p.ecxmsochpdefault1, li.ecxmsochpdefault1, div.ecxmsochpdefault1
        {mso-style-name:ecxmsochpdefault1;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle29
        {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-AU link=blue vlink=purple>

<div class=Section1>

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

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>That doesn’t sound right to me… Returning is a completely
different concept to exceptions and they are not used in the same way. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It is possible to use returning parameters with workflow but it’s
a bit of a pain… so I tend to stick to exporting which is more straightforward.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I think you are going down the wrong track there… look at my
other response re the correct exception classes to use.<o:p></o:p></span></p>

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

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Jocelyn <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>

<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>Robert van den Berg <br>
<b>Sent:</b> Thursday, 20 May 2010 7:33 PM<br>
<b>To:</b> sap-wug@mit.edu; SAP Workflow Users' Group; SAP Workflow Users'
Group<br>
<b>Subject:</b> Re: Re: RE: exception in class and passing of parameters<o:p></o:p></span></p>

</div>

</div>

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

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Hi all,<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>I
discovered where the evil is. In the old situation with BOR objects, the method
has a return parameter (setting on the method). So the 'exceptions' are not
exceptions but return values.<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Is there a
possibility to use this with a Class method?<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Best
regards,<o:p></o:p></span></p>

<p style='margin-bottom:12.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Robert<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>On May 20,
2010 10:58 &quot;Robert van den Berg&quot; <a href="mailto:wug@bergtop-ict.nl">&lt;wug@bergtop-ict.nl&gt;</a>
wrote:<o:p></o:p></span></p>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Mike,<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>it does
not realy need a statement to pass the value, does it?<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>The export
parameter is set by the normal ABAP statement:<o:p></o:p></span></p>

<p><span style='font-size:7.5pt;font-family:"Verdana","sans-serif"'>APPEND
ls_amr TO amr_reject.<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>AMR_REJECT
is set as exporting parameter.<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Regards,<o:p></o:p></span></p>

<p style='margin-bottom:12.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Robert<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>On May 20,
2010 10:48 &quot;Mike Gambier&quot; wrote:<o:p></o:p></span></p>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Jocelyn,<br>
&nbsp;<br>
I'm not sure that's entirely accurate anymore.&nbsp;ABAP was adjusted some time
ago&nbsp;to return EXPORTING, TABLES&nbsp;and CHANGING parameters in FMs or
ABAP Class Methods&nbsp;<strong><span style='font-family:"Verdana","sans-serif"'>even</span></strong>
if you raise an exception.<br>
&nbsp;<br>
We have several examples of where an Exception is thrown and we can still trust
the value of an Exporting 'Error' flag or Application Log instance&nbsp;as
well.<br>
&nbsp;<br>
The flaw highlighted by Robert&nbsp;I think is buried in the way the value
being received is being bound (or not) into the Method container.<br>
&nbsp;<br>
Mike GT<br>
&nbsp;<o:p></o:p></span></p>

<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>

<hr size=2 width="100%" align=center id=stopSpelling>

</span></div>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>From: jocelyn.dart@sap.com<br>
To: sap-wug@mit.edu<br>
Date: Thu, 20 May 2010 10:30:07 +0200<br>
Subject: RE: exception in class and passing of parameters<o:p></o:p></span></p>

<div>

<p class=ecxmsonormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Robert, </span><span style='font-size:10.0pt;font-family:
"Verdana","sans-serif"'><o:p></o:p></span></p>

<p class=ecxmsonormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<p class=ecxmsonormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>If you raise an exception, the exporting parameters are NOT returned
to the calling application (not just workflow – all calling applications)
&nbsp;– exact same behaviour as function modules.&nbsp; The test tool “cheats”
a little. &nbsp;</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p></o:p></span></p>

<p class=ecxmsonormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<p class=ecxmsonormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>So for a synchronous task either use an additional exporting
parameter to indicate success/failure or use an exception class to update the
workflow log with your returned value.</span><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'><o:p></o:p></span></p>

<p class=ecxmsonormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Or raise an event (with or without parameters) – and make your
task asynchronous. </span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p></o:p></span></p>

<p class=ecxmsonormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

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

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

<p class=ecxmsonormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<div>

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

<p class=ecxmsonormal><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>Robert van den Berg <br>
<b>Sent:</b> Thursday, 20 May 2010 6:17 PM<br>
<b>To:</b> SAP Workflow Users' Group<br>
<b>Subject:</b> exception in class and passing of parameters</span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p></o:p></span></p>

</div>

</div>

<p class=ecxmsonormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Hi
Group,<br>
&nbsp;<br>
I have a task which uses a method of a class. This&nbsp;method has export
parameters and exceptions.<br>
Before the exception is raised, the export parameter is set.<br>
&nbsp;<br>
The problem is that, when the exception is raised, the export parameter is
empty. When I test the method from the class builder, the export parameter
contains a value but when I test the workflow, the workflow container is empty.<br>
&nbsp;<br>
Does anyone have an idea?<br>
&nbsp;<br>
Regards,<br>
Robert<br>
&nbsp;<o:p></o:p></span></p>

</div>

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

<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>

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

</span></div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Get
a free e-mail account with Hotmail. Sign-up now. <o:p></o:p></span></p>

</blockquote>

</blockquote>

</div>

</body>

</html>