on ‎2014 Feb 17 3:19 PM
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!
Request clarification before answering.
Hallo,
as you can see here http://help.sap.com/saphelp_nw74/helpdata/en/48/99b3f3ee2b73e7e10000000a42189b/content.htm, you can use the standard exception SYSTEM_FAILURE and COMMUNICATION_FAILURE to avoid RFC dump:
CALL FUNCTION 'Z_TEST'
DESTINATION 'AAAAAAA'
EXCEPTIONS
system_failure = 1
communication_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE 'Error'.
ENDIF.
Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 = 1 MESSAGE l_rfc_mess
communication_failure = 2 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using a sharp solution like CATCH CX_ROOT ?
Regards,
Raymond
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How?
I tried this:
TRY.
CALL FUNCTION 'ZMYRFC' DESTINATION 'ABC'.
CATCH CX_ROOT.
WRITE 'ERROR IN RFC'.
ENDTRY.
But dump occurs.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.