How can external systems be integrated into SAP and which interfaces does the ERP system offer?
SAP standard interfaces offer possibilities to connect external systems to SAP. Last but not least, the digitalization of processes in companies requires integration of non-SAP systems. SAP interfaces allow any other software and other solutions to exchange data with the SAP system. Each available interface for exchange of data has advantages and disadvantages. Here we present the most important interfaces for integration and describe their basic functions.
RFC – Remote Function Call
The classic way for communication between non-SAP systems and SAP is, according to SAP itself, the RFC interface. RFC interfaces are also often used to communicate between SAP systems itself. Put simply, RFC is a remote function call. The RFC interfaces for integration have been available since SAP/R3 until today. With RFC, there is a RFC client and a RFC server, whereby the client calls a function on the server. The function is executed on the remote system. In an RFC coupling, both systems can act as server and client. The call of an RFC function is synchronous, so that it is especially suitable for processes in which decisions or data are directly required for production. The OPC Router can call RFC interfaces in the SAP system using all parameter types and data, but it can also be configured as an RFC server and serve as a call target.
BAPI – Business Application Programming Interface
The basic concept of BAPIs is object orientation. BAPIs make the business objects available in the SAP system for access by external systems. Business objects represent real objects such as orders, customers or articles. The instances are accessed exclusively using methods provided by the business object. Technically the method is called on the basis of the RFC interfaces. The instance to which the calls are made is determined by key fields (customer number, and so on). The OPC Router connects BAPIs via SAP plug-in.
The IDoc (Intermediate Document) is an SAP file format. It is intended for transfer of transaction data. The structure of an IDoc is prescribed by the IDoc type and defines the exact length and position of fields in the file. The IDoc is divided into a header line, any number of data segments and status records. In contrast to the RFC interfaces, communication via IDocs is always asynchronous. The sender creates an IDoc with data according to the specification of the IDoc type and transfers it to the target system. The receiving system accepts the IDoc and inserts it into the processing buffer for IDocs, from which the documents are processed successively. IDocs are a very old and proven method of communication and are especially suitable for transferring master data and posting records. You can use the SAP plug-in to send IDocs from any source.
SOAP web services are one of the newer technologies for connecting SAP. Since version 7.0 and the introduction of SAP NetWeaver, Web services have been standard for interfaces. SOAP is a pure web technology and functions are called using the http protocol. RFC Functions are also made available via the SOAP interface. The client receives detailed information about the functions and their parameters via the WSDL file (Web Service Description Language). The WDSL file can be retrieved via a defined URL. Web services are created in SAP using WebDynpro and connected to ABAP programs and RFC interfaces. RFC functions can also be published as Web services using other solutions (such as SAP MII). The OPC Router can use SAP Web services with its SOAP plug-in.
For some years now, the SAP Gateway has had the functionality to provide ABAP functions and RFC interfaces in the form of a REST API. REST has some advantages over SOAP, but is similar in technology, since it is also a function call via http protocol. Compared to SOAP, REST is easy to call from various platforms, transfers pure human readable data in JSON or XML and is faster and saves resources. In the basic idea of REST, an object is accessed via REST, not its methods. The state of the object can be changed by the REST access. The change is caused by passed parameters. A frequent application is the connection of the SAP PI via the REST interface.
Connecting OPC to an RFC
In this video you can see an exemplary coupling of an SAP system with an RFC interface.