cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi!

I have a RFC but sometimes i have a dump because connection problems.

How can avoid this dump? I need to use TRY CATCH statment, but has any way to get a generic exception?

Thanks!

0 Likes
View Entire Topic
ThangaPrakash
Active Contributor
0 Likes

Hello Rodrigo,

Try to use the below concept used inside the function module "BW_RFCDEST_GET".

* RFC-Dest. check

*... Try a RFC-ping to check the RFC-destination

     CALL FUNCTION 'RFC_PING' DESTINATION l_rfcdest

       EXCEPTIONS

         system_failure        = MESSAGE l_rfc_mess

         communication_failure = MESSAGE l_rfc_mess

         OTHERS                = 3.

* no access to BW

     IF sy-subrc <> 0.

       IF l_rfc_mess IS INITIAL.

         MESSAGE e628 RAISING rfc_ping_failed.

       ELSE.

         MESSAGE e629 WITH l_rfc_mess RAISING rfc_ping_failed.

       ENDIF.

     ENDIF.


Regards,

Thanga