Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Code_understand

Former Member
0 Likes
335

What does the following code means?

  • overflow ?

catch system-exceptions conversion_errors = 1.

xkomv-kawrt = arbfeld_dec.

endcatch.

When do we use CATCH-ENDCATCH statement?

2 REPLIES 2
Read only

Former Member
0 Likes
300

If a specific statement is expected to error out or throw a exception and you want to handle the error rather than throwing the error / exception to the user, you use the TRY / CATCH block.

You write the statement which is likely to throw the exception in the TRY block and catch the exception in the CATCH block where you specify the action to be taken when the exception is thrown.

In this case you are catching all the system exceptions and when the exception is raised the field xkomv-kawrt is being assigned some value in the variable, arbfeld_dec.

Regards,

Ravi

Read only

0 Likes
300

Thanks Ravi..

In my current case, a strange thing is occuring.

The value of arbfeld_dec is 1 but after the assignment xkomv-kawrt = arbfeld_dec, the value of xkomv-kawrt becomes 10 and not 1.

CAn you explain this phenomenon?