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 concept in SAP

Former Member
0 Likes
817

Hi All,

Is Function Module concept meant for only modularity of the code or something to do with the performance also?...

-Satya Priya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
790

Hi,

In any language funtion modules and sub-routines are mainly used for code re-uasability and modularity.

In that funtion modules are global.

sub-routines are local.

But both we are using for re-usability only..

Thanks

P.SRIKANTH

7 REPLIES 7
Read only

Former Member
0 Likes
790

hi,

it is mainly used for modularity and code reusebilty.

def standard Fm will improve performances.

Regards

Reshma

Read only

Former Member
Read only

Former Member
0 Likes
790

hi

good

Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.

Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.

Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.

The Function Builder also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm

thanks

mrutyun^

Read only

0 Likes
790

Hi all,

Interesting and cautious thing about this function group ( Which will act like a container for all logically related Fm's) is the following ...

If you call a FM .. all the function modules which are present in that function group will be copied into the Main memory ... leads to performance problems.

So keep it in mind while calling function modules.

Reward useful points.

Regards,

Mohan

Read only

Former Member
0 Likes
790

Hi,

Function modules are procedures that are defined in function groups and can be called from any ABAP program.

It is used used for modularity as well as for code reusability.

Read only

Former Member
0 Likes
791

Hi,

In any language funtion modules and sub-routines are mainly used for code re-uasability and modularity.

In that funtion modules are global.

sub-routines are local.

But both we are using for re-usability only..

Thanks

P.SRIKANTH

Read only

Former Member
0 Likes
790

Thank you all for spending time on my question.