Re: [Pysaprfc-users] RFC Server Module
Brought to you by:
klvon
From: Klavdij V. <von...@si...> - 2005-08-31 18:46:28
|
You have to register the module with r/3 using transaction sm59. Please, check SAP help but basically there are two options - starting program from either backend or frontend (or registered server machine via rsh), or registernig already running process. If you go for second option you have to pass certain arguments when starting program, usually those are -a<prog_name> -g<gateway> -x<gw_port> where prog_name is program id from sm59, gateway is a name or ip of sap gateway server and gw_port is the port gateway is runing on. When using first option and running on Windows you have to produce an .exe using py2exe or similar tool, on Unix/Linux making script executable using chmod is enough. HTH, Klavdij > The following Module should run out of the box. But it says "exception > 'connection failed'". I have o clue whats going on. Can pls somebody give > me a hint how the module has to be started > > #!/usr/bin/env python > # -*- coding: latin_1 -*- > > import pysap > class MyFunc(pysap.RFC_SERV_FUNC): > _name_='Z_MY_FUNC' > _importing_=[('IN_VALUE','I')] > _exporting_=[('OUT_VALUE','I')] > > def run(self,handle): > self['OUT_VALUE']=2*self['IN_VALUE'] > > import sys > srv=pysap.RfcServerEx() > try: > srv.register_func(MyFunc) > srv.main_loop(sys.argv) > except pysap.SapRfcError, msg: > > print "exception %s " % (msg) > > sys.exit(1) > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Pysaprfc-users mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysaprfc-users |