For business applications, it is necessary to communicate and exchange information (in pre-defined formats) with other systems. Hence, there are well defined mechanisms to enable this communication. SAP has also provided us with such mechanism called RFC, which stands for 'Remote Function Call'.
RFC is a SAP protocol to handle communications between systems to simplify the related programming. It is the process of calling a function module which is residing in a different machine from the caller program. RFCs can be used to call a different program in the same machine as well, but usually it is used when 'calling' and 'called' function modules/ programs are running on separate machines.
Must Know Details About RFC
- SAP Uses CPIC (Common Programming Interface for Communication) Protocol to transfer data between Systems. It is SAP Specific protocol. Remote Function Call (RFC) is a communications interface based on CPI-C, but with more functions and easier for application programmers to use
- The RFC library functions support the C programming language and Visual Basic (on Windows platforms)
- RFC connections can always be used across the entire system.This means that an RFC connection you have defined in client 000 can also be used from client 100 (without any difference).
- RFC is the protocol for calling special subroutines (function modules) over the network. They have a defined interface through which data, tables and return codes can be exchanged. Function modules are managed in the R/3 System in their own function library, called the Function Builder.
- The Function Builder (transaction SM37) provides application programmers with a useful environment for programming, documenting and testing function modules that can be called locally as well as remotely. The R/3 System automatically generates the additional code (RFC stub) needed for remote calls.
- You maintain the parameters for RFC connections using transaction SM59. The R/3 System is also delivered with an RFC-SDK (Software Development Kit) that uses extensive C libraries to allow external programs to be connected to the R/3 System.
- The only difference between a remote call of a function module to another server and a local call is a special parameter (destination) that specifies the target server on which the program is to be executed.
RFC helps to reduce the efforts of programmers, by letting them avoid the re-development of modules and methods at remote systems.
Types of RFC:
Types of RFC Connections – SM59
Type 3 - entries specify connection between ABAP systems. Here, we must specify the host name / IP address. You can, however, specify logon information if desired. This is applicable for both type of RFCs, between ABAP systems and external calls to ABAP systems
Type I - entries specify ABAP systems connected to the same data base as the current system. These entries are pre-defined and cannot be modified. Example entry name: ws0015_K18_24
- ws0015=host name
- K18=system name (database name)
- 24=TCP-service name
Type T - destinations are connections to external programs that use the RFC API to receive RFCs. The activation type can be either Start or Registration. If it is Start, you must specify the host name and the pathname of the program to be started.
Type H - HTTP Connections to ABAP System.
Type G - HTTP Connections to External Server.
Ref: gurus99.com
No comments:
Post a Comment