on 01-26-2017 3:17 AM
I'm a beginner just started the integration with SAP.
I'm using VS2013 on Windows 7 64bit.
Here's some of my test code in C#:
namespace SapTestClient
{
class SapConfig : IDestinationConfiguration
{
public bool ChangeEventsSupported() { return true; }
public event RfcDestinationManager.ConfigurationChangeHandler ConfigurationChanged;
public RfcConfigParameters GetParameters(string destinationName)
{
if (destinationName.Equals("test")) {
RfcConfigParameters parms = new RfcConfigParameters();
parms.Add(RfcConfigParameters.AppServerHost, "10.65.34.30");
parms.Add(RfcConfigParameters.SystemNumber, "01");
parms.Add(RfcConfigParameters.SystemID, "ENH");
parms.Add(RfcConfigParameters.User, "MY_USERNAME");
parms.Add(RfcConfigParameters.Password, "MY_PASSWD");
parms.Add(RfcConfigParameters.Client, "001");
parms.Add(RfcConfigParameters.Language, "EN");
parms.Add(RfcConfigParameters.PoolSize, "5");
return parms;
}
return null;
}
}
class Program {
static void Main(string[] args)
{
string destName = "test";
SapConfig sc = new SapConfig();
RfcDestinationManager.RegisterDestinationConfiguration(sc);
RfcDestination dest = RfcDestinationManager.GetDestination(destName);
try {
Console.WriteLine("RfcDestination.Ping():");
dest.Ping();
}
catch (RfcCommunicationException ce)
{
int rc = ce.ErrorCode; string strRC = "RC : " + rc; Console.WriteLine(strRC);
Console.WriteLine(ce.ToString());
}
Console.ReadLine();
}
}
}
MY_USERNAME, MY_PASSWORD are those of I use to log on the sinvpn.coil.sap.com.
And the ping execption messages are:
RfcDestination.Ping():
RC : 107
SAP.Middleware.Connector.RfcCommunicationException:
LOCATION CPIC (TCP/IP) on local host PC with Unicode
ERROR partner '10.65.34.30:3301' not reached
TIME Thu Jan 26 11:43:38 2017
RELEASE 721
COMPONENT NI (network interface)
VERSION 40
RC -10
MODULE nixxi.cpp
LINE 3283
DETAIL NiPConnect2: 10.65.34.30:3301
SYSTEM CALL connect
ERRNO 10061
ERRNO TEXT WSAECONNREFUSED: Connection refused
COUNTER 2
at SAP.Middleware.Connector.CpicConnection.ConnectAsClient(Dictionary`2 options, Boolean forRepository)
at SAP.Middleware.Connector.RfcConnection.ConnectAsClient(RfcDestination destination, Boolean forRepository)
at SAP.Middleware.Connector.RfcConnectionPool..ctor(RfcDestination destination, Boolean forRepositoryCalls)
at SAP.Middleware.Connector.RfcConnectionPool.GetPool(RfcDestination destination, Boolean forRepository, Boolean create)
at SAP.Middleware.Connector.RfcDestination.GetClient(Boolean forRepository) at SAP.Middleware.Connector.RfcDestination.Ping()
at SapTestClient.Program.Main(String[] args) file E:\Projects\SapClient\SapClient\Program.cs: line 62
I opened port 3300-3399 in Windows Defender. However, when I try "telnet 10.65.34.30 3301", it failed.
I also checked port listings in the C:\Windows\System32\drivers\etc\services file.
What Did I done wrong?
Hi there!! I have almost the same issue... have you ever solved the problem???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.