<div>G&#39;day Mike,</div><div> </div><div>Long time....</div><div> </div><div>Unfortunately it&#39;s not as simple as me not passing parameters properly. In the 7.02 version I&#39;m on, when I declare the exception class to include messages it automatically gets the IF_T100_MESSAGE interface and when I declare an exception text, the auto-generated constant is a &#39;direct entry type&#39; with code generated to populate the scx_t100key structured key based on the fields I maintain against the exception text. </div>
<div> </div><div>In my code when I have...</div><div>RAISE EXCEPTION TYPE zcx_awi_wf_temp_trim<br>EXPORTING<br>       textid = zcx_awi_wf_temp_trim=&gt;invalid_business_object_type<br>       mv1    = lv_m1.</div><div> </div>
<div>...I am passing a fully structured key. But I don&#39;t need to code it, it&#39;s stored against the class definition.</div><div> </div><div>I&#39;m my case I guess I don&#39;t have a strong reason for wanting to use T100 based exception texts, but I believe it &#39;should&#39; work. You know how I get caught up on things that &#39;should&#39; happen :-)</div>
<div> </div><div>I&#39;ve seen similar comments from you in numerous posts to WUG but to be honest I&#39;m stuggling to see your point about why such T100 messages are anything other than another option. One where for an existing message with detailed long text it&#39;s probably the most convenient option. Can you detail what is so evil about them??</div>
<div> </div><div>Having issues with OSS connection at site, so still waiting to apply note. Will let you all know if it makes any difference.</div><div> </div><div>Thanks!</div><div>Mark<br><br></div><div class="gmail_quote">
On 16 February 2012 01:47, Mike Pokraka <span dir="ltr">&lt;<a href="mailto:wug@workflowconnections.com">wug@workflowconnections.com</a>&gt;</span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
Oh man, why T100 exception classes? They&#39;re an evil invention supposedly<br>
for easier transition and mixology of old style T100 messages and class<br>
exceptions, but really end up confusing matters and making errors more<br>
difficult to trace. But that&#39;s just my opinion; I prefer to map T100<br>
messages into class exceptions and keep separation clear.<br>
<br>
Onto your problem: IF you still want to use those type of exception<br>
classes, then you simply need to pass the message parameters properly. The<br>
textid parameter for message-based exception classes contains a full<br>
structure. You don&#39;t need to do any coding or add additional parameters in<br>
the exception class. I whipped up, a quick test class/prog but no time to<br>
test in a WF, but you should get the picture:<br>
<br>
DATA: lo_oops TYPE REF TO ycx_t100exc,<br>
      ls_t100 TYPE scx_t100key,<br>
      lv_msg  TYPE string.<br>
TRY.<br>
    ls_t100-msgid = &#39;SWF_RUN&#39;.<br>
    ls_t100-msgno = &#39;001&#39;.<br>
    ls_t100-attr1 = &#39;go home&#39;.<br>
    RAISE EXCEPTION TYPE ycx_t100exc<br>
      EXPORTING<br>
        textid = ls_t100.<br>
  CATCH ycx_t100exc INTO lo_oops.<br>
    lv_msg = lo_oops-&gt;get_text( ).<br>
    WRITE: lv_msg.  &quot;==&gt; Action &amp;go home&amp; is unknown<br>
ENDTRY.<br>
<br>
Regards,<br>
Mike<br>
<div><div class="h5"><br>
<br>
On Wed, February 15, 2012 5:37 am, Mark Pyc wrote:<br>
&gt; G&#39;day Jocelyn,<br>
&gt;<br>
&gt; Yep, when I created the Sub-class I selected the &#39;with Message Class&#39;<br>
option which included the interface. I don&#39;t quite understand the use of<br>
the Interface as I don&#39;t need to do anything with it. I haven&#39;t<br>
&gt; reimplemented the GET_TEXT method. Within normal ABAP if I raise and<br>
catch<br>
&gt; an exception, the standard GET_TEXT will correctly resolve the message<br>
variable into appropriate text.<br>
&gt;<br>
&gt; My harness is as follows:<br>
&gt;<br>
&gt; REPORT<br>
&gt;<br>
&gt; Z_PYC_EXCEPTION.<br>
&gt;<br>
&gt; data:<br>
&gt; lr_cx TYPE REF TO zcx_awi_wf_temp_trim,<br>
&gt; lv_msg type string.<br>
&gt;<br>
&gt; try.<br>
&gt; perform sub1.<br>
&gt; catch zcx_awi_wf_temp_trim INTO lr_cx.<br>
&gt; call method lr_cx-&gt;if_message~get_text<br>
&gt; receiving<br>
&gt; result = lv_msg.<br>
&gt; write:/ lv_msg.<br>
&gt; ENDTRY.<br>
&gt;<br>
&gt; form SUB1 RAISING zcx_awi_wf_temp_trim.<br>
&gt; data:<br>
&gt; lv_m1 type symsgv.<br>
&gt;<br>
&gt; lv_m1 = &#39;BUS2013&#39;.<br>
&gt; RAISE EXCEPTION TYPE zcx_awi_wf_temp_trim<br>
&gt; EXPORTING<br>
&gt; textid = zcx_awi_wf_temp_trim=&gt;invalid_business_object_type<br>
&gt; mv1 = lv_m1.<br>
&gt;<br>
</div></div>&gt; endform. *&quot; SUB1*<br>
&gt; **<br>
<div class="im">&gt;<br>
&gt; It gives:<br>
&gt; BUS2013 is an invalid Business Object Type<br>
&gt;<br>
&gt; When included into WF, the Step History shows:<br>
&gt; MV1 is an invalid Business Object Type<br>
&gt;<br>
&gt; I&#39;m just not sure if WF is doing something other than calling GET_TEXT<br>
and<br>
&gt; therefore missing the T100 logic. I know that the CX_BO_TEMPORARY<br>
doesn&#39;t<br>
&gt; include the T100 interface and so the WF code won&#39;t be expecting to do<br>
anything with it, but just having the interface linked is enough from<br>
some<br>
&gt; snippets I&#39;ve read. WF runtime should be able to call GET_TEXT without<br>
needing to know about T100 explicitly....???<br>
&gt;<br>
&gt; Any advice appreciated.<br>
&gt;<br>
&gt; Have fun,<br>
&gt; Mark<br>
&gt;<br>
&gt;<br>
&gt; On 15 February 2012 15:41, Dart, Jocelyn &lt;<a href="mailto:jocelyn.dart@sap.com">jocelyn.dart@sap.com</a>&gt; wrote:<br>
&gt;<br>
</div>&gt;&gt; Hi Mark, ****<br>
<div class="im">&gt;&gt; I’ve not tried IF_T100_MESSAGE – are you able to add it to your exception<br>
&gt;&gt; class and call a method  or function module to create the message text<br>
from<br>
</div>&gt;&gt; the GET_TEXT method? ****<br>
&gt;&gt; ** **<br>
<div class="im">&gt;&gt; There are heaps of function modules that do it... I seem to recall I used<br>
</div>&gt;&gt; one of the BAL_LOG_ ones... ****<br>
&gt;&gt; Regards,****<br>
&gt;&gt; Jocelyn****<br>
&gt;&gt; ** **<br>
&gt;&gt; *From:* <a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu</a> [mailto:<a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu</a>] *On<br>
Behalf Of *Mark Pyc<br>
&gt;&gt; *Sent:* Wednesday, 15 February 2012 12:53 PM<br>
&gt;&gt; *To:* WUG<br>
&gt;&gt; *Subject:* Exception Classes which use T100 Message -<br>
&gt;&gt; IF_T100_MESSAGE****<br>
&gt;&gt; ** **<br>
&gt;&gt; G&#39;day Wuggers,****<br>
&gt;&gt;  ****<br>
&gt;&gt; Is it possible to utilise T100 based exceptions within WF? ****<br>
&gt;&gt;  ****<br>
<div class="im">&gt;&gt; I&#39;ve created an sub-class of CX_BO_TEMPORARY and included an Exception ID<br>
&gt;&gt; which is based on a T100 message including variables. I&#39;ve extended my<br>
class to have additional attributes for passing in data (MV1, MV2, MV3,<br>
MV4<br>
&gt;&gt; all like SYMSGV) which are then referenced as appropriate in the pop-up<br>
for<br>
</div>&gt;&gt; assigning a T100 message to the Exception ID. ****<br>
&gt;&gt;  ****<br>
&gt;&gt; When I raise the exception, I pass in the additional parameters.****<br>
&gt;&gt;  ****<br>
<div class="im">&gt;&gt; If I test this via a simple harness program, the text of the message is<br>
</div>resolved correctly.****<br>
&gt;&gt;  ****<br>
<div class="im">&gt;&gt; When I integrate into WF, the variable isn&#39;t resolved and remains as<br>
MV1<br>
</div>&gt;&gt; in the text of the WF log. ****<br>
&gt;&gt;  ****<br>
<div class="im">&gt;&gt; I&#39;ve seen some prior posts from Jocelyn that suggest adding a BAPIRET2<br>
based table and redefining the GET_TEXT method to offer the ability of<br>
passing multiple messages with a single exception. Is this necessary to<br>
</div>even handle a basic scenario?****<br>
&gt;&gt;  ****<br>
<div class="im">&gt;&gt; I&#39;ve found OSS note 1671428 (yet to be translated) which looks<br>
promising<br>
&gt;&gt; but am waiting for it to be applied to the system. However in thinking it<br>
&gt;&gt; through further I doubt it will change anything since CX_BO_TEMPORARY<br>
</div>doesn&#39;t implement IF_T100_MESSAGE.****<br>
&gt;&gt;  ****<br>
<div class="im">&gt;&gt; Can anyone confirm if the T100 based exceptions are possible in WF, or do<br>
&gt;&gt; I need to go down the path of redefining GET_TEXT as suggested by Jocelyn?<br>
</div>&gt;&gt; ****<br>
&gt;&gt;  ****<br>
&gt;&gt; Many thanks,<br>
&gt;&gt; Mark****<br>
<div class="HOEnZb"><div class="h5">&gt;&gt; _______________________________________________<br>
&gt;&gt; SAP-WUG mailing list<br>
&gt;&gt; <a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a><br>
&gt;&gt; <a href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target="_blank">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><br>
&gt; _______________________________________________<br>
&gt; SAP-WUG mailing list<br>
&gt; <a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a><br>
&gt; <a href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target="_blank">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><br>
&gt;<br>
<br>
<br>
<br>
<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>
</div></div></blockquote></div><br>