4.2.1 Attributes

name
Name of the interface

parms
Array of interface parameter objects

callback
a reference to an object instance that has the necessary callback handlers for controling a registered RFC:

class reg:

	def __init__(self):
		self.cnt = 0
		import os

....

	def handler(self, iface, srfc):
		data = []
		print "COMMAND is: #" + iface.COMMAND.getValue() + "#"
		out = os.popen(iface.COMMAND.getValue(), "r")
		for row in out:
			data.append(row)
		out.close()
		iface.PIPEDATA.setValue( data )
		return 1
The handler method gets passed the original instance of the saprfc.iface object, and the saprfc.conn object. The saprfc.conn object has a member sapinfo which returns a dictionary of the current connection details (updated for each registered RFC call).

In tRFC (transaction RFC), the handler gets passed an additional parameter - the Transaction ID (TID), like so:

class reg:

	def __init__(self):
		self.cnt = 0
		import os

....

	def handler(self, iface, srfc, tid):
		data = []
		print "TID (reg.handler) is: #" + tid + "#"
		print "COMMAND is: #" + iface.COMMAND.getValue() + "#"
		out = os.popen(iface.COMMAND.getValue(), "r")
		for row in out:
			data.append(row)
		out.close()
		iface.PIPEDATA.setValue( data )
		return 1

....