You can use the DCOM connector or the Java Connector to connect to an SAP system if you have access to a programming language like VB, C++ or Java. If you don't and a client of yours needs to extract data from an SAP system to a flat file then here is the procedure to accomplish it. We make use of a DOS batch file which will call the SAP standard STARTRFC executable to attach to the SAP machine.
To start an RFC from an external system the following items must be set up on the pc which initiates the function call:
The sap-supplied executable program startrfc.exe,
the remote function call itself,
a pc batch file which invokes the rfc,
and optionally a sideinfo.sap file which describes the sap instance.
The basis people should be able to supply you with the executable program startrfc and the sideinfo.sap file.
A sample batch file might be
SET SIDE_INFO=c:\Directory_name\attributes\sideinfo.sap
startrfc -E FUNCTION_CALL_PARAMETER1=XXX -E FUNCTION_CALL_PARAMETER2=YYY -t -d DEV -u SAPUSERID -p USERPWD -c 100 -l EN -F RFC_FUNCTION_CALL_NAME -T OUTPUT_TABLE_NAME,250,w=outputname.txt
Function options
-F <function module name>
-E <parameter>=<value>
-T <table name>,<width>,[r=<file>][,w=<file>]
Where <file> is a path name to read from (r) or write to (w) the internal table. If <file> is -, stdin or stdout is used.
RFC connect options
-d <destination> name of the RFC destination. Necessary, if you are using a 'sideinfo' file.
-2 SNA mode on. You must set this if you want to connect to R/2. All other connection data must be supplied by a sideinfo file.
-3 R/3 mode on. You must set this if you want to connect to R/3.
Specify the following options:
-h <hostname> hostname of the R/3 target system.
-s <system number> system number of the target system. This determines the TCP/IP service to be used to connect to the R/3 system. The default value is 0 and the default service being used then is sapgw00.
-gui start sapgui. To allow dynpro and graphics processing (3.0C or later required on the target system).
Using an intermediate SAP gateway, specify:
-g <gateway host>
-x <gateway service> (Must not be used with -gui or -debug option).
-balanced load balancing mode. Another way to connect to R/3, if the R/3 system is 3.0C or later and workload balancing is active on that system. Requests are automatically routed to the application server having the best response times in the moment.
Specify the following options:
-h <host name> hostname of R/3's message server.
-s <system name> name of the target system. This determines the TCP/IP service to be used to connect to the R/3 system. The system name is a 3 letter word. If the system name is XXX, the service being used is sapXXX.
-g <group name> name of application server group. The default is PUBLIC.
-gui start sapgui To allow dynpro and graphics processing.
Additional options:
-t turn trace on. All operations are written to the trace file 'dev_rfc'
-debug turn ABAP/4 debugging mode on. This can only be done, if sapgui is installed on the client system and the target system has version 3.0C or later.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.