Transaction RFC  

Transaction RFC, RFC Client and RFC Server

IDocs are given a destination and sent from the R/3 System by calling the function module ‘INBOUND_IDOC_PROCESS’ and using transaction RFC. The destination determines the target computer and target program is defined in the ALE configuration.

To receive IDoc data from R/3, an external system must have a program called ‘RFC client’. This program should carry the target program name and contain the name of the function module. The R/3 data contained in the IDoc is transferred in the form of the internal tables. When EDI_DC contains all the application data, EDI_DC has the administrative data for each IDoc.

Starting with Release 3.0C, it is possible to register this program through SAP gateway in RFC destination and thus opens the connection between the external system and the gateway. When registering to the gateway, the program may need to look up at file saprfc.ini and find the gateway address.

To send the IDoc into R/3, the external system needs to use a RFC program to log in R/3 and call up the function module ‘INBOUND_IDOC_PROCESS’. This program, called RFC server, constructs IDoc data and places it in the internal table of structure EDI_DC. A check record must be generated for each IDoc and placed in the internal table of structure EDI_DC. Special attention needs to be paid to the Transaction Identification Management. Once again, saprfc.ini can be used to look up logon information.

Both RFC client and RFC server can be programmed in C or C++. RFC class library is available starting with Release 3.0F. You can also generate a C program body from the function module display /nSE37 and use it as the basic framework. For details on programming RFC client and RFC server, see the document ‘ALE Interface" and "RFC Tutorial’.