Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Sentence Try...Catch when submiting a report

$
0
0

Hello gurus,

  

I have a problem catching the errors when submiting a report inside a class.

  

Here is the method I'm using:

 

method CALL_ROUTINE.  data: ocatch   TYPE REF TO cx_root,        text   TYPE string.  TRY.   SUBMIT ZTEST AND RETURN.  CATCH CX_SY_ZERODIVIDE into ocatch.    text = ocatch->get_text( ).  CATCH cx_root INTO ocatch.    text = ocatch->get_text( ).  ENDTRY.

endmethod.

 

 

Dump is ocurring but is not getting catched by the try..endtry sentence.

 

 

If I type down the code inside the submit directly into the try...catch...endtry from the method then it works.

 

I have also tried to use a try..endtry sentence inside the ZTEST report and pass the exception to the calling method with no luck.

 

I wonder if there's any way to get the ZTEST exceptions from the calling method.

 

Thanks in advance

Regards


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>