<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: working with class based exception and dynamic method calls in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-class-based-exception-and-dynamic-method-calls/m-p/10497925#M1851775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Udo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the exception-table must contain only non-class-based exceptions. If you want call a dynamic method with class-based exceptions you dont fill the exception-table. You have to call the dynamic-method with TRY...CATCH...ENDTRY. If you dont know exactly which exception this method can raise you can catch CX_ROOT, the mother of all exception classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;&amp;nbsp; CALL METHOD lr_instance-&amp;gt;(method_name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PARAMETER-TABLE ptab.&lt;/P&gt;&lt;P&gt;CATCH cx_root into lr_error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; lv_error = lr_error-&amp;gt;get_text( ). "--&amp;gt; maybe a usefull error message&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetz, Matthias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2014 16:04:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-11-11T16:04:57Z</dc:date>
    <item>
      <title>working with class based exception and dynamic method calls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-class-based-exception-and-dynamic-method-calls/m-p/10497924#M1851774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we just changed out ERP from EHP6 to EHP7.&lt;/P&gt;&lt;P&gt;Since we did so we are facing an issue with an Z-Report we are using quite often.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This reports looks up Workitems and executes the according methods so that we can go into debugging if we were facing any problems or errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since the EHP Upgrade this statement has problems:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&amp;nbsp; data:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lt_parmbind&amp;nbsp;&amp;nbsp; type abap_parmbind_tab,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lt_excpbind&amp;nbsp;&amp;nbsp; type abap_excpbind_tab,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lo_runtime&amp;nbsp;&amp;nbsp;&amp;nbsp; type ref to object.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call method lo_runtime-&amp;gt;(iv_cls_method)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameter-table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lt_parmbind&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exception-table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lt_excpbind.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;this CALL METHOD Statement has Problem with the Exception Table. We are quite often getting DYN_CALL_METH_EXCP_NOT_FOUND short dumps with Exception "CX_SY_DYN_CALL_EXCP_NOT_FOUND".&lt;/P&gt;&lt;P&gt;The system has problems handling the content of lt_excpbind. if i clear this table the CALL METHOD statement works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AS an example we are trying to call /IDXGC/CL_PD_PROCESS_STEPS--&amp;gt;CREATE_DATA. This method has 2 exceptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;/IDXGC/CX_PROCESS_ERROR&lt;/TD&gt;&lt;TD&gt;Process Layer Exception&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CX_BO_TEMPORARY&lt;/TD&gt;&lt;TD&gt;Temporary Business Exception&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Content of LT_EXCPBIND is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;INDEX&lt;/TD&gt;&lt;TD&gt;NAME&lt;/TD&gt;&lt;TD&gt;VALUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;/IDXGC/CX_PROCESS_ERROR&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;CX_BO_TEMPORARY&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my point of view the Problem ist, that they are marked as "class based". I think so because if you looked up the SAP Help for the EXCEPTION-TABLE Statement it is written that is statement only works for none-classbased exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that restriction is quiet clear. But what i am wondering about is.. that restriction also exists for EHP6. And in EHP6 it work. Does anyone know why? Or how i can change me CALL METHOD Statement that i will work again?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Udo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 14:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-class-based-exception-and-dynamic-method-calls/m-p/10497924#M1851774</guid>
      <dc:creator>udobuchter</dc:creator>
      <dc:date>2014-08-28T14:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: working with class based exception and dynamic method calls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-class-based-exception-and-dynamic-method-calls/m-p/10497925#M1851775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Udo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the exception-table must contain only non-class-based exceptions. If you want call a dynamic method with class-based exceptions you dont fill the exception-table. You have to call the dynamic-method with TRY...CATCH...ENDTRY. If you dont know exactly which exception this method can raise you can catch CX_ROOT, the mother of all exception classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;&amp;nbsp; CALL METHOD lr_instance-&amp;gt;(method_name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PARAMETER-TABLE ptab.&lt;/P&gt;&lt;P&gt;CATCH cx_root into lr_error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; lv_error = lr_error-&amp;gt;get_text( ). "--&amp;gt; maybe a usefull error message&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetz, Matthias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 16:04:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-class-based-exception-and-dynamic-method-calls/m-p/10497925#M1851775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-11T16:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: working with class based exception and dynamic method calls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-class-based-exception-and-dynamic-method-calls/m-p/10497926#M1851776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Class-based exceptions must be caught using try/catch statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calling dynamically a method catchable exceptions are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="lnkgreen" href="https://community.sap.com/" title="External Object"&gt;CX_SY_DYN_CALL_EXCP_NOT_FOUND&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A class="lnkgreen" href="https://community.sap.com/" title="External Object"&gt;CX_SY_DYN_CALL_ILLEGAL_CLASS&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;A class="lnkgreen" href="https://community.sap.com/" title="External Object"&gt;CX_SY_DYN_CALL_ILLEGAL_METHOD&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A class="lnkgreen" href="https://community.sap.com/" title="External Object"&gt;CX_SY_DYN_CALL_PARAM_MISSING&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;A class="lnkgreen" href="https://community.sap.com/" title="External Object"&gt;CX_SY_DYN_CALL_PARAM_NOT_FOUND&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;A class="lnkgreen" href="https://community.sap.com/" title="External Object"&gt;CX_SY_REF_IS_INITIAL&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway catching cx_root (as shown by Matthias) will catch everything is catchable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 16:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-class-based-exception-and-dynamic-method-calls/m-p/10497926#M1851776</guid>
      <dc:creator>manwell77t</dc:creator>
      <dc:date>2014-11-11T16:12:10Z</dc:date>
    </item>
  </channel>
</rss>

