Are you getting, “Connection Closed” while doing the “Connection Test” in SM59?
STEPS TO REPLICATE THE ISSUE:
Below is the error you would get:
SOLUTION:
Make sure that in your RFC Destination, the SSL is “Active”, unlike the screenshot below:
RESULT:
If the status HTTP Response is 500, know that the connection is established with the configured end-point.
Hope it helps.
Thanks & Regards,
In case it's not due to SSL, these SAP notes may help: