‎2011 Sep 09 6:41 AM
Hi experts,
we have a few Z-FMs which read the data from another system via RFC.
So the FM are created in the target system and we call them from our productive system.
These FMs are implemented in many programs.
Our problem is, when the target-system is not reachable (downtime, error, ...) all programs get a dump, because the rfc connection failed.
How can we avoid this dumps? (the programs should also be executable without the FM-data)
Is there a badi or exit for RFC-connections?
thx in advance
‎2011 Sep 09 7:22 AM
Hello
How can we avoid this dumps? (the programs should also be executable without the FM-data)
SAP has defined three [RFC exceptions|http://help.sap.com/abapdocu_702/en/abenrfc_exception.htm]: system_failure, communication_failure & resource_failure.
You'll need to implement them in your RFC to prevent the dumps.
BR,
Suhas
‎2011 Sep 09 7:05 AM
Hi Christian,
Our problem is, when the target-system is not reachable (downtime, error, ...) all programs get a dump, because the rfc connection failed
This is right if there is no response form the rfc.This RFC are you using to get data or to send data.Are you maintaining exceptions handling.
Regards,
Madhu.
‎2011 Sep 09 7:33 AM
Hi,
Before your calling your Z-Fm fountion Module you have to call RFC_PING funtion module pass the respective destination name . if sy-subrc = 0 . call your z fuction module.
lv_rfc_dest = " your destiantion
CALL FUNCTION 'RFC_PING'
DESTINATION lv_rfc_dest
EXCEPTIONS
communication_failure = 1
system_failure = 2
OTHERS = 3.
if sy-subrc =0 .
call z_fm """" call your z function module
endif.
‎2011 Sep 09 7:50 AM
Hi Christian,
The RFC_PING as suggested by Abdul will only check for the availability of the Remote System, the chances are that even though the target system is available it might be short on resources or there could be an exception at the application level.
I would suggest you go ahead with Suhas' suggestion of handling the exceptions while calling your ZRFC.
Regards,
Chen
‎2011 Sep 09 8:17 AM
Many thx for so many answers!
I decided to try the solution with the exception and it runs perfect!
I'm sorry, that I've not read that F1-Help first to statement DESTINATION, because there the exceptions also explained!
Thank you again
‎2011 Sep 09 8:21 AM
HI Pamin,
Good. A long back the same issue was posted by some one and it is replied by suhas.
Regards,
Madhu.
‎2011 Sep 09 7:22 AM
Hello
How can we avoid this dumps? (the programs should also be executable without the FM-data)
SAP has defined three [RFC exceptions|http://help.sap.com/abapdocu_702/en/abenrfc_exception.htm]: system_failure, communication_failure & resource_failure.
You'll need to implement them in your RFC to prevent the dumps.
BR,
Suhas