SAP: problem when dynamically changing the connection of an adapter service (RFC)

Hi all,

I’m working with wM7 and the following SAP adapter is installed: webMethods SAP Adapter 6.5 SP1.
I have created an adapter service for RFC Z_INT_MYRFC on connection MYCON1. But I also have a second connection MYCON2 that has to invoke this adapter service. So I want to dynamically change the connection at runtime.

The 6-5-SP1_SAP_Adapter_User_Guide says on page 62 that a field ‘serverName’ has to be passed the adapter service. In the input fields of the created adapter service there is no field ‘serverName’. I suppose the field ‘serverName’ must exist in the pipeline. In ‘serverName’ I specified the connection_alias (f.e.: MYCON2).
So I created a test service that does the following:

  1. a map step setting a field ‘serverName’ to “MYCON2”
  2. the adapter service calling RFC Z_INT_MYRFC
    When executing this test service the RFC is always called using connection MYCON1. So never on connection MYCON2.

In the guide there is also something about $connectionName, but I also do not see any input called $connectionName in the SAP RFC Adapter Service. I also 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.

Am I doing something wrong? Can anyone help me?

Thanks in advance!


Please check you are select correct Connection Alias when you are creating Adapter Service.



I created the adapter service with the correct selection and that works!
But I want to change the connection dynamically at runtime and this is not working.
I don’t know why!

I have also tried dynamically setting (overiding) the connection used by existing adapter services on WmSap 6.5 adapter and was never able to get it working. sorry to not have answer but wondering if you ever got this to work ?

No, until now I’m still not able to get it to work! :frowning:

Hi Bosarro,
if you create an Adapter Service for a specific RFC connection, then this AS can only be used for calls to the specified target system. The “serverName” input is ignored in that case.

You need to create the Adapter Service for the so called “EmptyConnection”. Then you can specify the target system dynamically via the “serverName” parameter.

(This behaviour has changed a bit since 4.6.)

Cheers, Lanzelot