Dynamically change the connection of RFC Adapter Service

Is it not possible to dynamically change the connection of RFC Adapter Service?

To invoke an RFC, there are two ways - one is to create one RFC Adapter Service and another is to directly invoke the RFC by calling pub.sap.client:invoke built-in service and pass the RFC name. I can see that by using the serverName in this built-in service, we can dynamically change the connection. But if I want to dynamically change the connection for RFC Adapter service, then what do I need to do?

On page 62 of the WmSAPAdapterUserGuide, it is mentioned that alternatively we can use $connectionName to change the connection. I think by using this, we can change the connection of any JDBC Adapter Service, but how to use $connectionName for SAP RFC Adapter Service, that is not clear to me.

Everything you do with the SAP adapter is based on an adapter connection, which you create in the Administrator GUI. The adapter connection name consists of folder.folder:connectionName. You can see this in the list of connections in Administrator, or locate the connection item in the Developer navigation panel and right-click it and select Copy. This will place the connection name in the correct format on you Windows clipboard for pasting wherever you need it.
By default, an SAP adapter service uses the connection you selected in Developer when creating the service. If you assign a different connection name to the $connectionName input to the adapter service then it will use that connection at run-time.

regards,

Jonathan Heywood
webMethods (now Software AG) Professional Services

Hi Jonathan,

I can locate to the connection in the Developer navigation panel. But the copy option is disabled. I tried this after disabling the connection, but still the copy option is disabled (I am logged in with Administrator).

I also do not see any input called $connectionName in the SAP RFC Adapter Service. I created one test flow service and assign full namespace value of the connection (folder.folder:connectionName) to the variable $connectionName. And finally called the SAP Adapter Service. But this adapter service is taking the default connection everytime, by which it was created.

Regards,
Paresh