Example #1
0
        public void GetConfigSettingsSuccess()
        {
            Manager manager = new Manager();
            SapConnection sapConnection = manager.GetSapConfigurationInformation();

            Assert.AreNotEqual(null, sapConnection.Host);
        }
        /// <summary>
        /// Initialises connectivity with SAP
        /// </summary>
        public SAPProcessRemoteFunction()
        {
            SAPSystemConnect sapCfg = new SAPSystemConnect();

            //this.Destination = RfcDestinationManager.GetDestination(sapCfg.GetParameters("DEV"));
            Manager manager = new Common.Configuration.Manager();
            SapEnvironment sapEnvironment = manager.GetSapEnvironmentName();
            this.Destination = RfcDestinationManager.GetDestination(sapCfg.GetParameters(sapEnvironment.EnvironmentName));
        }
Example #3
0
        public RfcConfigParameters GetParameters(String destinationName)
        {
            Manager manager = new Manager();
            SapConnection sapConnection = manager.GetSapConfigurationInformation();

            RfcConfigParameters parms = new RfcConfigParameters();
            parms.Add(RfcConfigParameters.AppServerHost, sapConnection.Host);
            parms.Add(RfcConfigParameters.SystemNumber, sapConnection.SystemNumber);
            parms.Add(RfcConfigParameters.User, sapConnection.User);
            parms.Add(RfcConfigParameters.Password, sapConnection.Password);
            parms.Add(RfcConfigParameters.Client, sapConnection.Client);
            parms.Add(RfcConfigParameters.Language, sapConnection.Language);
            parms.Add(RfcConfigParameters.PoolSize, sapConnection.PoolSize);
            parms.Add(RfcConfigParameters.MaxPoolSize, sapConnection.MaxPoolSize);
            parms.Add(RfcConfigParameters.Name, destinationName);

            return parms;
        }