Status Confirmation: Triggering the SAP System

As is the case with inbound processing of IDoc files, the external system must call the program startrfc. The status confirmation call differs from the inbound IDoc case only with regard to the function module parameters. The startrfc must therefore be started with different parameters for the status and inbound IDoc files.


You require the startrfc program from the RFC library.


Enter the startrfc command with the logon and function module parameters listed below. The command line could begin as follows:

startrfc -3 -d C11 -u EDIUSER ...

Logon Parameters


Value (Example)



Logon to the SAP system using RFC



SAP system ID. This is displayed in the system bar, for example.



SAP user
Enter the name in upper case letters.

For security reasons, you should use a CPI-C user, as this user type cannot be used in a dialog.

The user requires all of the necessary authorizations.



User password

Enter the password in upper case letters.



SAP client (default: 000)
as contained in the MANDT field in the control record.



SAP system language (default: EN)



Application server (message server): Call transaction SM51. The first part of the server name field (separated by underscores) stands for the application server. This character string is case-sensitive.



Two-digit system ID (TCP/IP service): Call transaction SM51. The third part of the server name field (separated by underscores) stands for the system ID.



Gateway host:

1. Call transaction SE38.

2. Enter the report name RSPARAM.

3. Select Execute and do not select the field Display also unsubstituted (the system variable values are then displayed)

4. Select Find (CTRL-F)

5. Enter rdisp/sna_g and confirm your entry

6. The name of the gateway host is displayed in the line rdisp/sna_gateway (you may have to scroll to the right)

This character string is case-sensitive.



Gateway service as in /etc/services :

1.-5. Repeat steps 1-5 for the gateway host (parameter -g)

6. The name of the gateway service is displayed in the line rdisp/sna_gw_service (you may have to scroll to the right)

This character string is case-sensitive.


Writes the log data to the file dev_rfc in the current directory.


Load-Balancing option: Calls are automatically sent to the application server with the shortest current response time. Prerequisite: You use load balancing for RFC in your SAP system.

For the ‚–balanced’ option, you must also specify the following parameters: -h, -s, -g, -gui.

For more information about RFC with load balancing, see under RFC Library ® Media Library ® RFC Library Guide.pdf.


Starts the SAPGUI.

This option allows you to process screens and graphics.

Function module parameters for status reports


Value (Example)




Only this function module reads status files!



EXT/status/<file name>

Directory and name of the file which contains the status information for outbound messages (max. 100 characters)



Logical name of the external system as defined in the port definition (max. 10 characters)


You have notified the upstream system of the SAP function module to be called and the parameters (file and directory) to be used. Store the logical name of the upstream system (EXT in the above table) in the Port definition (section "status") so that the SAP System recognizes it and accepts the status records.

Once you have maintained the port definition, the process with triggering appears like the transfer of an IDoc file (see the graphic below):


       1.      The upstream external system writes the status confirmation to a sequential file in the IDoc status record format.

       2.      The external system starts the SAP System with the rfcexec program.

       3.      The name and directory of the file (as well as the port) are transferred to the SAP System as startrfc parameters.

       4.      The SAP system reads the status file and then deletes it. The status records must contain the numbers of the outbound IDocs that they refer to (field DOCNUM). In this way, these IDocs can be added to the database.