Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

function module VS RFC

Former Member
0 Likes
2,147

any body can help me to know the difference between function module and remote function module...?

4 REPLIES 4
Read only

Former Member
0 Likes
1,268

Hi,

Function modules are modularzation elements in the ABAP programming language. The encapsulate some function that can be reused. They provide an interface or signature in which to pass data to and from the function module.

RFC is a remote enabled function module. All you need to do is set the flag on the attributes tab of the function module and you have an RFC.

A BAPI is nothing more than a function module. BAPIs usualy contain the logic for some business function, like "Create Sales Order", or "Change Purchase Order". Again they provide an interface to pass data to and get data from the BAPI. You will never see "Exceptions" in a BAPI as they are designed to be called from other systems, and may no be able to handle exceptions. Also, you will never see a BAPIs signature change. If SAP feels the need to change the signature of the BAPI, then will create a new bapi. Example, is BAPI_SALESORDER_CREATEFROMDAT1 and BAPI_SALESORDER_CREATEFROMDAT2. They won't change the signature, but they will create a new one and incorporate the change

Regards,

Satish

Read only

Former Member
0 Likes
1,268

hi,

both are functionmodules.

but remote function module we can call from other system.

to create a remote function call u must specify the rfc destinations.

and u must specify in attributes tab rfc enabled.

regards,

chandu

Read only

Former Member
0 Likes
1,268

hi,

function module: is a function module it is available with in sap system only.

RFC

A remote function call is a procedure for data interchange between a client and server. Typically the client calls a server program and the server returns the results via a TCP/IP connection. Remote function calls may be associated with SAP software and ABAP programming and provide a way for an external program (written in languages such as PHP, ASP Java, or C, C++) to use data returned from the server. Data transactions are not limited to getting data from the server, but can insert data into server records as well.

A remote function call (RFC) is the call of a function module that runs in an external system to the calling program. Although it is possible to call a function module in the same system as an RFC, normally RFCs are used when the caller and the called function module run in different systems.

In the SAP system, these functions are provided by the RFC interface system. The RFC interface system enables function calls between two SAP systems, or between a SAP system and an external system.

Read only

Former Member
0 Likes
1,268

differences:

1)normal function module only called within the server...but RFC can be called across the server.

2)we can acess data from RFC function module from non sap also...but not possible for normal fucntion modules.

3)we always use pass by value mode in RFC's but in normal fucntion module we can use pass by value or pass by reference.

4)fast acessing using normal function modules...slow acessing using RFC's.

<REMOVED BY MODERATOR>

Dara.

Edited by: Alvaro Tejada Galindo on Apr 22, 2008 3:07 PM