Up to now, there was no officially released or documented possibility to create a fully fledged dynamic RFC destination that can be entered behind CALL FUNCTION DESTINATION.
If you crawl the Web for "dynamic RFC destination", you find one or the other hint how to achieve that, but the general recommendation is: Don't do that!
In order to direct that uncontrolled growth into the right channels, a new class is delivered with ABAP 7.50:
DATA(dest) =
cl_dynamic_destination=>create_rfc_destination(
logon_client = ...
logon_user = ...
logon_language = ...
sid = ...
server = ...
group = ...
... ).
CALL FUNCTION 'DEMO_RFM_PARAMETERS'
DESTINATION dest
EXPORTING ...
From ABAP 7.50 on, CL_DYNAMIC_DESTINATION is the officially released and documented possibility to create a dynamic RFC destination and the only one to be used if SM59 is not sufficient.