Posted: Mon Oct 08, 2007 3:28 pm Post subject: Calling SAP from an external system
Calling SAP from an external system
Example STARTRFC.EXE call to put an Idoc into SAP for further processing.
Header data
exchange method is to be set to 'F'.
the port type is to be set to '3'.
the logical destination can be defined without restrictions. However, it must be maintained via transaction 'SM59' (TCP/IP links).
Settings for the directories and file names: parameter for the output processing
- Directory: absolute path for the command file which should start the EDI subsystem.
- Shell script: Name of the command file.
- Automatically: If the field is selected, the command file can be executed.
parameter of the output file
- Directory: Absolute path for the file which contains the outgoing intermediate documents.
- File: Static name of the file for outgoing intermediate documents.
- Function module: Name of a function module which dynamically generates the file name at the runtime. The concatenated path and file name is transferred to the command file.
parameter of the inbound file
- The SAP system expects the concatenated path and file name if it is called for the inbound processing. If this value is missing, the system tries to create a path and a file name according to the initial logic from the stored values.
parameter of the status file
- The SAP system expects the concatenated path and file name if it is called for the status processing. If this value is missing, the system tries to generate a path and a file name according to the initial logic from the stored values.
Setting the command file for the call 'startrfc'
For calling the EDI interface during the inbound and status processing, you must have a command line of the form: startrfc -3 -d <SID> -u <USER> -p <PASSWORD> ... in your command file.
In this case, the flags mean:
- 3 no value
- d SAP System ID, the value can be found via transaction 'SM51'. The name consists of a field split into 3 by underscores, the second part is the SAP System ID.
- u User ID (online user) which is to be used. Enter the name in upper case.
- p Password of the user after the -u flag. Enter the password in upper case.
- c The client of the SAP system. This is the same value which is put into the field 'MANDT' in the control record (EDI_DC).
- l The language to be used for log-on, for example E for English.
- h Application server, The value of which can be found via transaction 'SM51'. The name consists of a field split into 3 by underscores, the first part is the application server. Notice the lower case.
- s 2-character system ID, the value of which is found via transaction 'SM51'. The name consists of a field split into 3 by underscores, the third part is the system ID.
- g Gateway Service machine, the value of which is found via transaction 'SE38'. Enter the program 'RSPARAM' and press 'Execute'. Search with 'rdisp/g' via the menu System -> List -> Search for.... A double-click on the first line takes you into the parameter list. The Gateway Service machine can be found in the line 'rdisp/gateway'. Notice the lower case.
- x Gateway Service, the value of which can be found via transaction 'SE38'. Enter the program 'RSPARAM' and press 'Execute'. Search with 'rdisp/g' via the Menu System -> List -> Search for... . A double-click on the first line takes you into the parameter list. You find the Gateway Service in the line 'rdisp/gw_service'. Notice the lower case.
- t No value, switches the trace which is written into the current directory on.
- F Value 'EDI_DATA_INCOMING' for the inbound processing, Value 'EDI_STATUS_INCOMING' for the status processing.
- E Value 'PATHNAME=<path+file>', where <path+file> is the path and file name of the intermediate document file (inbound) or status file.
- E Value 'PORT=<EDI Subsystem>', where <EDI-Subsystem> is the port from the port definition.
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.