on 01-13-2017 2:29 PM
Hi,
I'm working on a really simple app running as RFC Server. I installed SAP Netweaver 7.5 trial version. Here is the code to start the server :
private void button2_Click(object sender, EventArgs e)
{
RfcDestinationManager.RegisterDestinationConfiguration(new RfcDestinationConfig());
RfcServerManager.RegisterServerConfiguration(new RfcServerConfig());
Type[] handlers = new Type[1] { typeof(StfcConnectionStaticImpl) };
RfcServer server = RfcServerManager.GetServer("PRD_REG_SERVER", handlers);
server.Start();
}
Then the handling class :
class StfcConnectionStaticImpl
{
// The annotation binds the function (name) to its implementation
[RfcServerFunction(Name = "STFC_CONNECTION")]
public static void StfcConnection(RfcServerContext serverContext, IRfcFunction function)
{
Console.WriteLine("System Attributes: " + serverContext.SystemAttributes.ToString());
function.SetValue("ECHOTEXT", function.GetString("REQUTEXT"));
function.SetValue("RESPTEXT", "NCO3: Hello world.");
}
}
next the Rfc destination config class :
public class RfcDestinationConfig : IDestinationConfiguration
{
public event RfcDestinationManager.ConfigurationChangeHandler ConfigurationChanged;
public bool ChangeEventsSupported()
{
return false;
}
public RfcConfigParameters GetParameters(string destinationName)
{
if ("PRD_000".Equals(destinationName))
{
RfcConfigParameters parms = new RfcConfigParameters();
parms.Add(RfcConfigParameters.AppServerHost, "172.18.3.22");
parms.Add(RfcConfigParameters.SystemNumber, "00");
parms.Add(RfcConfigParameters.User, "developer");
parms.Add(RfcConfigParameters.Password, "Appl1ance");
parms.Add(RfcConfigParameters.Client, "001");
parms.Add(RfcConfigParameters.Language, "EN");
parms.Add(RfcConfigParameters.PoolSize, "5");
parms.Add(RfcConfigParameters.MaxPoolSize, "10");
parms.Add(RfcConfigParameters.IdleTimeout, "600");
return parms;
}
else return null;
}
}
and last the Rfc server class :
public class RfcServerConfig : IServerConfiguration
{
public event RfcServerManager.ConfigurationChangeHandler ConfigurationChanged;
public bool ChangeEventsSupported()
{
return false;
}
public RfcConfigParameters GetParameters(string serverName)
{
if ("PRD_REG_SERVER".Equals(serverName))
{
RfcConfigParameters parms = new RfcConfigParameters();
parms.Add(RfcConfigParameters.GatewayHost, "172.18.3.22");
parms.Add(RfcConfigParameters.GatewayService, "sapgw00");
parms.Add(RfcConfigParameters.ProgramID, "DOT_NET_SERVER");
parms.Add(RfcConfigParameters.RepositoryDestination, "PRD_000");
parms.Add(RfcConfigParameters.RegistrationCount, "5");
return parms;
}
else return null;
}
}
The server start perfectly but when i go to SAP Gateway (SMGW) here is what I get :
My registration in the Gateway is ok.
The problem coming from Logged-on Client because I only see the external client and not the registered program :
My question is why I don't get the Program as Registered Server ?
Is there some SAP configuration to do to allow Program registration ?
If someone can't help me to solve this out, it will be great.
Thank you,
Ronan
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.