SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Calling SAP from an external system



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Connect to External system, Unix и Perl
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Mon Oct 08, 2007 3:28 pm    Post subject: Calling SAP from an external system Reply with quote

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.

Example
Code:
copy inbound\isap5271.app  \\SAPDEV\saploc\Dev\sys\global\in\gr\

move inbound\isap5271.app saptmp\isap5271.app

bin\startrfc -3 -d DEV -u UNAME -p PASSWORD -c 400 -l E -h devsys -s 00 -g devsys -x sapgw00 -F EDI_DATA_INCOMING -E PATHNAME: \\devsys\sapmnt\dev\sys\global\ORDERS.app -E PORT=DEV400ORDI
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Connect to External system, Unix и Perl All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
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.