cancel
Showing results for 
Search instead for 
Did you mean: 

NCO3 and RfcConfigParameters

Former Member
0 Kudos

I am getting an errir message "The given key is not in the dictionary" when trying to retrieve the repository information for BAPI (It doesn't matter which one.  I get this error on all I've tried),

I therefore "assume" this means that somehow I've supplied a key in my RfcConfigParameters which does not exist.

These are the RfcConfigParameters that I am supplying:

                RfcConfigParameters.Client,

                RfcConfigParameters.User,

                RfcConfigParameters.Password,

                RfcConfigParameters.Name,

                RfcConfigParameters.Language

                RfcConfigParameters.PoolSize

                RfcConfigParameters.MaxPoolSize

                RfcConfigParameters.IdleTimeout

I have validated that all the values of these parameters are correct.

Anyone have any ideas what "The given key is not in the dictionary" means?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please provide the relevant code :

  1. IDestinationConfiguration implementation .
  2. Destination fetch ( RfcDestinationManager.GetDestination(...) ).

Yarden

Former Member
0 Kudos

Yarden,

I am not using the IDestinationConfiguration class as my app cannot use app.config to hold the connection information.    Instead, I am hardcoding the values as shown below.

Here is the code snippet that shows how I am populating an instance of the RfcConfigParameters

The code works fine connecting directly to an AppServer.  The error only exists when connecting to a Message Server.             

RfcConfigParameters myConfig = new RfcConfigParameters();

{

myConfig.Add(RfcConfigParameters.Client, "100");

myConfig.Add(RfcConfigParameters.User, "WARDELLC");

myConfig.Add(RfcConfigParameters.Password, "XXXXXXXX");

myConfig.Add(RfcConfigParameters.Name, "D01");

myConfig.Add(RfcConfigParameters.Language, "EN");

}

Then

If I am connecting to an AppServer...(this works fine)

{

myConfig.Add(RfcConfigParameters.SystemNumber,"00");

myConfig.Add(RfcConfigParameters.AppServerHost, "yadayada.net");

}

else (This gets the error message)

{

myConfig.Add(RfcConfigParameters.MessageServerHost, "yadayada.net");                myConfig.Add(RfcConfigParameters.LogonGroup,"ECC");

}

Former Member
0 Kudos

Yarden,

I found my problem.  For a MsgServer connection, I also needed to add the GATEWAY_HOST parameter.

I wish I understood why a GATEWAY_HOST parameter was not required for the AppServer type connection.

At least it's working now.

Thanks

Answers (0)