Application Development 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: 

Catching Exception

Former Member
0 Kudos

Hi,

How to catch the class expection in the Function module.

4 REPLIES 4

Former Member
0 Kudos

hi,

regards,

Santosh

Former Member
0 Kudos

You can do something like this :

try.

call method &1->add_aggregation

exporting

columnname = &3

aggregation = &4

receiving

value = &5.

catch <b>cx_salv_data_error</b> .

catch <b>cx_salv_not_found</b> .

catch <b>cx_salv_existing</b> .

endtry.

Declare the above exceptions in the <b>exception tab</b> of the FM.

0 Kudos

Hi Ravi,

If the function module is remote function module then it will not work. But in my case the i am using the Remote Function module

Former Member
0 Kudos

In case of RFC FM you can collect all the exceptions and populate an error file which can be stored on the application server immediately on execution of the FM.