Vous êtes sur la page 1sur 13

Introduction to RFC (Remote Function Call)

What is RFC?

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. SA has also pro!ided us with such mechanism called RFC, which stands for "Remote Function Call".

#F$ is a SA protocol to handle communications between systems to simplify the related programming. %t is the process of calling a function module which is residing in a different machine from the caller program. #F$s 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.

%n SA , #F$ %nterface system is used for setting-up #F$ connections between different SA systems, and also between an SA and an external (non-SA ) system.

Must Know Details About RFC

SA 'ses $ %$ ($ommon rogramming %nterface for $ommunication) rotocol totransfer data between Systems. %t is SA Specific protocol. #emote Function $all (#F$) is a communications interface based on $ %-$, but with more functions and easier forapplication programmers to use (he #F$ library functions support the $ programming language and )isual *asic (on +indows platforms) #F$ connections can always be used across the entire system.(his means that an #F$ connection you ha!e defined in client ,,, can also be used from client -,, (without any difference). #F$ is the protocol for calling special subroutines (function modules) o!er the networ.. Function modules are comparable with $ functions or AS$A/ procedures. (hey ha!e a defined interface through which data, tables and return codes can be exchanged. Function modules are managed in the #&0 System in their own function library, called the Function *uilder. (he Function *uilder (transaction S102) pro!ides application programmers with a useful en!ironment for programming, documenting and

testing function modules that can be called locally as well as remotely. (he #&0 System automatically generates the additional code (#F$ stub) needed for remote calls. 3ou maintain the parameters for #F$ connections using transaction S145. (he #&0 System is also deli!ered with an #F$-S67 (Software 6e!elopment 7it) that uses extensi!e $ libraries to allow external programs to be connected to the #&0 System. (he only difference between a remote call of a function module to another ser!er and a local call is a special parameter (destination) that specifies the target ser!er on which the program is to be executed.

The RFC Advanta es!

#F$ helps to reduce the efforts of programmers, by letting them a!oid the rede!elopment of modules and methods at remote systems. %t is capable enough to8

$on!ert the data into the format understandable by the remote (target) system. $on!ert the data into the format understandable by the remote (target) system. $all up certain routines which are necessary to start communication with remote system. Handle errors that might occur in the process of communication.

T"#es o$ RFC!

%"nchronous

re9uires both the systems (client and ser!er) to be a!ailable at the time of communication or data transfer. %t is the most common type and is re9uired when result is re9uired immediately after the execution of s#F$. s#F$ is a means of communication between systems where ac.nowledgements are re9uired. (he resources of the Source System wait at the target system and ensure that they deli!er the message&data with A$76. (he 6ata is consistent and reliable for communication. (he issue is if the target system is not a!ailable, the source system resources wait until target system is a!ailable. (his may lead to the rocesses of source system to go into Sleep&#F$&$ %$ 1ode at target systems and hence bloc.s these resources. &sed $or For communication between systems For communication between SA +eb Application Ser!er to SA :'%

As"nchronous
%t is communication between systems where ac.nowledgements are not re9uired (it is similar to post card deli!ery).%t doesn"t re9uire both the systems to be a!ailable at the time of execution and the result is not immediately re9uired to be sent bac. to calling system. (he Source System resource does not waitfor the target system as they deli!er the message&data without waiting for any ac.nowledgement. %t is not reliable for communication sincedata may be lost if the target system is not a!ailable. &sed $or '

For communication between systems For parallel processing

Transactional
%t is a special form of a#F$. (ransactional #F$ ensures transaction-li.e handling of processing steps that were originally autonomous. (ransactional #F$ is an asynchronous communication method that executes the called function module in the #F$ ser!er only once, e!en if the data is sent multiple times due to some networ. issue. (he remote system need not be a!ailable at the time when the #F$ client program is executing a t#F$. (he t#F$ component stores the called #F$ function, together with the corresponding data, in the SA database under a uni9ue transaction %6 ((%6). t#F$ is similar to a#F$ as it does not wait at the target system (Similar to a registered post). %f the system is not a!ailable, it will write the 6ata into a#F$ (ables with a transaction %6 (S14;) which is pic.ed by the scheduler #SA#F$S< (which runs for e!ery =, seconds). &sed For'

<xtension of Asynchronous #F$ For secure communication between systems

(ueued

>ueued #F$ is an extension of t#F$. %t also ensures that indi!idual steps are processed in se9uence. (o guarantee that multiple /'+s (/ogical 'nit of +or.& (ransaction) are processed in the order specified by the application. t#F$ can be seriali?ed using 9ueues (inbound and outbound 9ueues). Hence the name 9ueued #F$ (9#F$). 'sed For

<xtension of the (ransactional #F$ For a defined processing se9uence %mplementation of 9#F$ is recommended if you want to guarantee that se!eral transactions are processed in a predefined order.

How to Configure and Test RFC.


(his tutorial is di!ided into @ sections -. A. 0. @. Setup a #F$ connection (rusted #F$ connection (esting a #F$ connection <rror #esolution

)rocedure to setu# an RFC connection!


<nter (ransaction $ode %M*+

%n the S145 screen, you can na!igate through already created #F$s connection with the help of option tree, which is a menu based method to organi?e all the connections on the basis of categories.

$lic. the "$#<A(<" button. %n the next screen , <nter

RFC Destination B Came of 6estination (could be (arget System %6 or anything rele!ant) Connection T"#e B here we choose one of the types (as explained pre!iously) of #F$ connections as per re9uirements. Descri#tion B (his is a short informati!e description, probably to explain the purpose of connection.

After you,%A-.,the connection, the system will ta.e you to "(echnical Settings" tab, where we pro!ide the following information8

Tar et /ostB Here we pro!ide the complete hostname or % address of the target system. %"stem 0umber 1 (his is the system number of the target SA system. $lic. Sa!e

%n the ,2o on and %ecurit", (ab, <nter (arget System information 2an ua e B As per the target system"s language Client B %n SA we ne!er logon to a system, there has to be a particular client always, therefore we need to specify client number here for correct execution. &ser ID and )assword B preferably not to be your own login %6, there should be some generic %6 so that the connection should not be affected by

constantly changing end-user %6s or passwords. 1ostly, a user of type "System" or "$ommunication" is used here. lease note that this is the 'ser %6 for the target system and not the source system where we are creating this connection.

$lic. Sa!e. #F$ connection is ready for use 0ote8 *y default a connection is defined as a#F$. (o define a connection as t#F$ or 9#F$ go to 1enu *ar -D 6estination a#F$ options & t#F$ options E pro!ide inputs as per re9uirements. (o define 9#F$ , use the special options tab.

Trusted RFC connection


(here is an option to ma.e the #F$ connection as ,Trusted,3 Fnce selected, the calling (trusted) system doesn"t re9uire a password to connect with target (trusting) system.

Following are the ad!antages for using trusted channels8 $ross-system Single-Sign-Fn facility assword does not need to be sent across the networ. (imeout mechanism for the logon data pre!ents misuse. re!ents the mishandling of logon data because of the time-out mechanism. 'ser-specific logon details of the calling&trusted system is chec.ed. (he #F$ users must ha!e the re9uired authori?ations in the trusting system (authori?ation obGect %4RFCAC2).(rusted connections are mostly used to connect SA Solution 1anager Systems with other SA systems (satellites)

Testin the RFC Connection


After the #F$s are created (or sometimes in case of already existing #F$s) we need to test, whether the connection is established successfully or not.

As shown abo!e we go to S145 to choose the #F$ connection to be tested and then we expand drop down menu - H&tilities'5Test'56H. +e ha!e three options8 Connection test '5 (his attempts to ma.e a connection with remote system and hence !alidates % address & Hostname and other connection details. %f both systems are not able to connect, it throws an error. Fn success it displays the table with response times. (his test is Gust to chec. if the calling system is able to reach the remote system.

Authori7ation Test '5 %t is used to !alidate the 'ser %6 and assword (pro!ided under "logon and security" tab for the target system) and also the authori?ations

that are pro!ided. %f test is successful, then same screen will appear as shown abo!e for the connection test. &nicode Test '5 %t is to chec. if the (arget system is a 'nicode or not.

Remote 2o on 15(his is also a .ind of connection test, in which a new session of the target system is opened, and we need to specify a login %6 and assword (if not already mentioned under "/ogon and Security" tab). %f the user is of type "6ialog" then a dialog session is created. (o Gustify the successful connection test, output will be the response times for the communication pac.ets, else error message will appear.

Vous aimerez peut-être aussi