Application Development 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: 

Function group and its function modules

Former Member
0 Kudos

Hi all,

Can anybody tell me why all the function modules of a function group are loaded into the memory when a single function module is called? What is the use of it?

Also tell me if there is any limit for creating the number of function modules under one function group.

Thanks,

Vinil.

1 ACCEPTED SOLUTION

Former Member

Hello,

The function modules in the function group are linked to each other and use the global variables defined in the top include. So they share the same memory area and hence are called when u debug.

There can be 99 function modules in a function group.

Regards,

Rahul Sinha

5 REPLIES 5

kesavadas_thekkillath
Active Contributor
0 Kudos

Functions within the same Function Group share a global memory area. When a program calls a Function Module, all the Function Modules within that group are loaded into memory within the same logical unit of work. This reduces system overhead by allowing the sharing of global data

You can add 99 Function modules to a function group . Check the table ENLFDIR

Please read Organization of Procedure Calls from sap help.

raviprakash
Advisor
Advisor
0 Kudos

Hi Vinil,

In ABAP, a function group is actually a single report. This is the reason why you can use SE38 to view a Function Group.

For example, if you have a function group "SEOD". The you can see this in SE38 (Transaction to see report) using the report name as "SAPLSEOD". Thus when a function module is loaded, also the whole Function group gets loaded. Its like when a subroutine is called, the whole report gets loaded.

Also, note, if you have a syntax error in one Function Module, calling any other funtion module dumps. 99 Function modules can be added to a function group.

Regards,

Ravi.

Former Member
0 Kudos

Hi,

In SAP, it is a function group - instead of function - that is loaded into active memory.

Function ( or function module ) is the one that you call from the program to do things.

A function group contains functionally related function modules, global variables and procedures .

To display / edit function module you use SE37,

To display / edit function group you use SE80

For creation of Fm check dis link,[Fm|http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm]

I dont think tht der is any limit for creating Fms u can create as many as u want.

Regards,

Archana

Former Member

Hello,

The function modules in the function group are linked to each other and use the global variables defined in the top include. So they share the same memory area and hence are called when u debug.

There can be 99 function modules in a function group.

Regards,

Rahul Sinha

Former Member
0 Kudos

Hi Vinil,

Whenever an internal session is started, a main program group is created. There can be any number of additional program groups inside the same internal session. However, each program group has only one main program.

When a function module or method that has not been loaded yet is called, an additional program group is created.

This link should help.

http://help.sap.com/saphelp_nw70/helpdata/EN/c5/aa575926ad11d2954d0000e8353423/content.htm

Nandesh