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

Diff b/w Function module and RFC.....

Former Member
0 Likes
4,478

Hi,

Wat is the difference between the Function module and RFC....

Thanx in adv,

Reg,

<b>Suresh.V</b>

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,121

Hi Suresh

Difference between FM & RFC:

RFC is also a functional module but it is remote enabled. Means from one system you can execute the RFC in another system. To make a FM RFC you have to take care of the following thisng:

1. you can convert a normal FM remote enabled by clicking the radiobutton remote-enabled module in the attribute of the FM.

2. You have to pass all the parameters by 'Pass by value'. While in case of normal FM (Not RFC) you can pass the parameters by 'Pass by referance also'.

3. While calling a RFC you have to pass a parameter 'Destination' which specify the destination where the Module will be executed.

Reward if useful.

Thanks

Aneesh.

5 REPLIES 5
Read only

ferry_lianto
Active Contributor
0 Likes
2,121

Hi,

Function modules are routines with a defined interface, supporting optional parameters and labelled exceptions, intended to perform specific tasks encouraging re-use.

Functions that are remotely callable via SAP's proprietary remote function call (RFC) protocol, have additional technical restrictions, primarily that the parameters cannot be changing and/or passed by reference, as previously mentioned. When a function module is marked as RFC-enabled, SAP checks that the function's interface meets the restrictions and also generates an internal stub routine to allow the RFC communication to take place (but we don't really need to know anything about that stub).

When a function module raises an exception, control is passed back to the calling program. When the calling program is an external RFC client, the caller receives only a return code indicating that an application exception was raised and the name of the exception as an upper-case text string. The caller is then responsible for inspecting the exception text to see what kind of error occurred.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
2,122

Hi Suresh

Difference between FM & RFC:

RFC is also a functional module but it is remote enabled. Means from one system you can execute the RFC in another system. To make a FM RFC you have to take care of the following thisng:

1. you can convert a normal FM remote enabled by clicking the radiobutton remote-enabled module in the attribute of the FM.

2. You have to pass all the parameters by 'Pass by value'. While in case of normal FM (Not RFC) you can pass the parameters by 'Pass by referance also'.

3. While calling a RFC you have to pass a parameter 'Destination' which specify the destination where the Module will be executed.

Reward if useful.

Thanks

Aneesh.

Read only

Former Member
0 Likes
2,121

FM can become RFC enabled....What you can do with RFC's....Connect diferent programming languages with SAP...Like C#, Perl, PHP, Ruby, Python....

Greetings,

Blag.

Read only

Former Member
0 Likes
2,121

Hi Suresh,

RFC is a special type of function module. When you create a function module in SE37, under ATTRIBUTES tab - Processing type - if you select the radiobutton for Remote Enabled module, the function module will become a RFC.

Another constraint for RFC is all parameters has to be pass by value.

RFC is used for data transfer between SAP and some other system.

Regards

Indrajit

Read only

Former Member
0 Likes
2,121

Hi, suresh,

there are basically two main difference between function module and RFC.

1. In RFC remote enabled in attributes is checked. means they can call by any remote systems also.

2. In RFC parameters are only pass by value. there is no pass by reference parameter in RFC.

regards,

Ruchika

Reward if useful.