-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to test RFC destination via Pyrfc (SAP ABAP) #241
Comments
Hello Karl, sorry the late response, I was on vacation. The error message is correct because the There is no fully automated solution working out of the box to check connections with multiple systems/destinations. The standard function module To test multiple destinations you can create a custom ABAP function module for that purpose. It will call FUNCTION z_test_destination.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_DEST) TYPE RFCDEST
*" EXPORTING
*" VALUE(RETCODE) TYPE SYST-SUBRC
*"----------------------------------------------------------------------
CALL FUNCTION 'RFC_PING' DESTINATION iv_dest
EXCEPTIONS
system_failure = 1
communication_failure = 2.
RETCODE = sy-subrc.
ENDFUNCTION. From Python you can open the connection to that system and call the custom function module with the destination parameter: result = conn.call('z_test_destination', iv_dest='SMPCLNT001') Hope this help solving the problem. |
Hi Srdjan, Thank you for the solution. BTW, is there any way we can do in python script so that we don't have to create the function module in customer's ABAP system? Many thanks! Best Regards |
Hello Karl, there is a SAP command line utility The installation and usage are described in SAP Note 500235 - Network Diagnosis with NIPING. Hope this helps further. Kind regards, |
Hi Karl, do I get it right that you want to test if RFC destionations listed in SM59 are working properly - i.e. you want to test if an ABAP system has RFC connectivity to other configured ABAP systems? Kind regards, BTW: The link posted by Srdjan has doubled URL, so it does not open corrrectly. The correct URL is https://launchpad.support.sap.com/#/notes/500235 |
Thanks, fixed the url |
@bsrdjan Both are remote-Enabled function modules, and can output ping result of given destination name. Best Regards |
@jfilak Hi Jakub, yes you are right. Best Regards |
Thank you @atomhippo for finding and sharing the solution, I was not aware of these function modules. |
Hi Pyrfc experts,
I am a sap basis guy, and I would like to build some automation code to execute system check after service windows for an ABAP systems.
One step of the manual check is to make connection test in SM59 of the ABAP system to the rfc destinations e.g. "SMPCLNT001"
Is it possible to perform that with Pyrfc? or any other automated / command line method?
BTW I saw some ABAP code with below line:
CALL FUNCTION 'RFC_PING' DESTINATION DEST
Is that possible to convert this line to Python?
I have tried:
result = conn.call('RFC_PING', DESTINATION = 'SMPCLNT001')
But it gives error that “DESTINATION” is not a known parameter.
Many thanks in advance.
Best Regards
Karl
SAP Basis
The text was updated successfully, but these errors were encountered: