<?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: Regards Catch statements in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005885#M1345051</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;CALL METHOD z_co_ifoasy_01_sa_gl=&amp;gt;execute_asynchronous&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;output = gv_zsafe_mt_acc_gl_posting01.&lt;/P&gt;&lt;P&gt;CATCH cx_ai_system_fault INTO s_exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_exception = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH cx_ai_application_fault INTO s_exception_app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( lv_exception IS INITIAL AND s_exception_app IS INITIAL )&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE i007.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;PERFORM update_log_table.&lt;/P&gt;&lt;P&gt;COMMIT WORK.&lt;/P&gt;&lt;P&gt;MESSAGE i009. "Message sent to XI".&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Veeranji Reddy on Aug 7, 2009 5:15 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2009 11:45:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-07T11:45:06Z</dc:date>
    <item>
      <title>Regards Catch statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005882#M1345048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any thing worng in my catch statements .because when i do debug the curser not catching the catch statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;CALL METHOD z_co_ifoasy_01_sa_gl=&amp;gt;execute_asynchronous&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;output = gv_zsafe_mt_acc_gl_posting01.&lt;/P&gt;&lt;P&gt;CATCH cx_ai_system_fault INTO s_exception.&lt;/P&gt;&lt;P&gt;CATCH cx_ai_application_fault INTO s_exception_app.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;IF ( s_exception IS INITIAL AND s_exception_app IS INITIAL )&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE i007.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;PERFORM update_log_table.&lt;/P&gt;&lt;P&gt;COMMIT WORK.&lt;/P&gt;&lt;P&gt;MESSAGE i009. "Message sent to XI".&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 09:13:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005882#M1345048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T09:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regards Catch statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005883#M1345049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How did you define s_exception?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would normally define it something like:&lt;/P&gt;&lt;P&gt;s_exception TYPE REF TO cx_root.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 11:33:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005883#M1345049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T11:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regards Catch statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005884#M1345050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raghunadh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you must implements your coding betwee the catch and endtry statement for cech error class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Dirk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 11:35:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005884#M1345050</guid>
      <dc:creator>DirkAltmann</dc:creator>
      <dc:date>2009-08-07T11:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regards Catch statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005885#M1345051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;CALL METHOD z_co_ifoasy_01_sa_gl=&amp;gt;execute_asynchronous&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;output = gv_zsafe_mt_acc_gl_posting01.&lt;/P&gt;&lt;P&gt;CATCH cx_ai_system_fault INTO s_exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_exception = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH cx_ai_application_fault INTO s_exception_app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( lv_exception IS INITIAL AND s_exception_app IS INITIAL )&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE i007.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;PERFORM update_log_table.&lt;/P&gt;&lt;P&gt;COMMIT WORK.&lt;/P&gt;&lt;P&gt;MESSAGE i009. "Message sent to XI".&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Veeranji Reddy on Aug 7, 2009 5:15 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 11:45:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005885#M1345051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T11:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regards Catch statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005886#M1345052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There should be an exception thrown by the system first in order for it to be caught. Probably your code is working correctly all the times and the exception is not thrown at all which is why the catch block is never executed. So there is nothing to worry about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also there is not need to check the exception reference to be initial after the endtry , because usually you should give an error message in the catch block which will automatically stop the processing of the code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The normal structure of try ...endtry is as follows :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Try
somthing....
catch exception_name  into exception_ref  " ... To handle exceptions
  message exception_ref-&amp;gt;longtext type 'E'. "Code will stop here.
  
endtry.

rest of the code....

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;KR,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 11:49:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005886#M1345052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T11:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regards Catch statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005887#M1345053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://www.sapnet.ru/abap_docu/ABENUEB-ABFB-SYSEXC.htm" target="test_blank"&gt;http://www.sapnet.ru/abap_docu/ABENUEB-ABFB-SYSEXC.htm&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2009 08:44:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regards-catch-statements/m-p/6005887#M1345053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-08T08:44:14Z</dc:date>
    </item>
  </channel>
</rss>

