module SAPNW::Servers::SAPNW::Base

Public Class Methods

rfc_register(args = nil) click to toggle source

registers with an R/3 systems gateway service. Uses parameters supplied in the YAML config file by default, but overrides these with any passed as a Hash. returns a SAPNW::RFC::Server object

# File lib/sapnwrfc/server.rb, line 19
  def rfc_register(args = nil)
parms = {}
                parms[:trace] = self.config['trace'].to_i        if self.config.key? 'trace'
                parms[:tpname] = self.config['tpname']           if self.config.key? 'tpname'
                parms[:gwhost] = self.config['gwhost']           if self.config.key? 'gwhost'
                parms[:gwserv] = self.config['gwserv']           if self.config.key? 'gwserv'
SAP_LOGGER.debug("[" + + "] base parameters to be passed are: " + parms.inspect)

case args
                          when nil
                          when Hash
                parms[:trace] = args[:trace].to_i        if args.key? :trace
                parms[:tpname] = args[:tpname]           if args.key? :tpname
                parms[:gwhost] = args[:gwhost]           if args.key? :gwhost
                parms[:gwserv] = args[:gwserv]           if args.key? :gwserv
    SAP_LOGGER.debug("[" + + "] with EXTRA parameters to be passed are: " + parms.inspect)
                                  raise "Wrong parameters for Connection - must pass a Hash\n"

server =
SAP_LOGGER.debug("completed the server connection (#{server.handle.class}/#{server.handle.object_id}) ...")
               return server