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 Module

Former Member
0 Kudos

What is the use of the check box " Global" in the attribute tab of the function module?

Also ,

I have copied an existing FM to a new FM in the same group. the moment i added a new import parameter the function module dumps. Without the addition of the new parameter the FM works fine.kindly help !

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Please check this:

You mark this field if the interface of the function module was made known globally through Edit -> Interface -> Globalize Parameters.

In this case, all the parameters that are fully typed and are defined for value transfer are treated as if global data objects with the same name were declared in the top-include - that is, they are visible in the entire function group and keep their value when the function module is exited. When the function module is called, all the parameters of a global interface are initialized and they get their defalut value.

All the other parameters are treated as if data objects of the same name were declared in the top Include (for table parameters, these are two in each case - one for the table body, one for the header line). But they can only be used during execution of the function module. This means they are visible in the entire function group, but they can only be accessed during execution of the function module. If such a parameter is accessed outside of actual execution of the function module, you get a runtime error GETWA_NOT_ASSIGNED with the meaning "Field symbol is not yet assigned" (such parameters are implemented internally through field symbols to which a data object is assigned during execution of the function module).

In the function group, no global data objects with the same name - such as a parameter of a global interface - may be created. If several function modules of a function group have global interfaces, parameters of the same name must be defined identically.

Note

The use of global interface parameters is obsolete and, in the new function modules, interfaces should generally not be globalized.

Regards,

5 REPLIES 5

Former Member
0 Kudos

hi check this..

After Locking/Unlocking in the Main Function Module The global variables required

http://help.sap.com/saphelp_nw04/helpdata/en/a7/51369e407a11d1893b0000e8323c4f/frameset.htm

regards,

venkat

Former Member
0 Kudos

Hi,

Please check this:

You mark this field if the interface of the function module was made known globally through Edit -> Interface -> Globalize Parameters.

In this case, all the parameters that are fully typed and are defined for value transfer are treated as if global data objects with the same name were declared in the top-include - that is, they are visible in the entire function group and keep their value when the function module is exited. When the function module is called, all the parameters of a global interface are initialized and they get their defalut value.

All the other parameters are treated as if data objects of the same name were declared in the top Include (for table parameters, these are two in each case - one for the table body, one for the header line). But they can only be used during execution of the function module. This means they are visible in the entire function group, but they can only be accessed during execution of the function module. If such a parameter is accessed outside of actual execution of the function module, you get a runtime error GETWA_NOT_ASSIGNED with the meaning "Field symbol is not yet assigned" (such parameters are implemented internally through field symbols to which a data object is assigned during execution of the function module).

In the function group, no global data objects with the same name - such as a parameter of a global interface - may be created. If several function modules of a function group have global interfaces, parameters of the same name must be defined identically.

Note

The use of global interface parameters is obsolete and, in the new function modules, interfaces should generally not be globalized.

Regards,

Former Member
0 Kudos

Hi,

The check box when checked means that the parameters of the function group would be avaliable to all the PBO and PAI modules and also in all subroutines of the Function Group.

If the FM from which you have copied it has a check box means that the the parameters are already declared.

Check the name of the parameter also check the dump that would give you information as to what is the cause of the dump.

Regards,

Himanshu Verma

Former Member
0 Kudos

Hi Shambavi,

Global

-


You mark this field if the interface of the function module was made

known globally through Edit -> Interface -> Globalize Parameters.

In this case, all the parameters that are fully typed and are defined

for value transfer are treated as if global data objects with the same

name were declared in the top-include - that is, they are visible in the

entire function group and keep their value when the function module is

exited. When the function module is called, all the parameters of a

global interface are initialized and they get their defalut value.

All the other parameters are treated as if data objects of the same name

were declared in the top Include (for table parameters, these are two in

each case - one for the table body, one for the header line). But they

can only be used during execution of the function module. This means

they are visible in the entire function group, but they can only be

accessed during execution of the function module. If such a parameter is

accessed outside of actual execution of the function module, you get a

runtime error GETWA_NOT_ASSIGNED with the meaning "Field symbol is not

yet assigned" (such parameters are implemented internally through field

symbols to which a data object is assigned during execution of the

function module).

In the function group, no global data objects with the same name - such

as a parameter of a global interface - may be created. If several

function modules of a function group have global interfaces, parameters

of the same name must be defined identically.

Note

-


The use of global interface parameters is obsolete and, in the new

function modules, interfaces should generally not be globalized.

Copy FM

-


Whenever copy the standard FM, you should assign the FM to New custom group only.

Steps to Copy

1. Go to SE80 and give the FG.

2. Wright click the FG and select 'Copy'.

3. Select the FM Which one is need to copy and give the Custom FM name.

4. Use this FM whereever requried.

Reward if it is helpful.

Regards,

Boobalan Suburaj.

Former Member
0 Kudos

If you select this field, the system declares the interface parameters in the function group globally. This means that, within the function group, you can access the function parameters in subroutines, as well as PBO and PAI modules. Unlike other global data, the contents of the global parameters of a function module are known only from the time of the call until you leave the module.

You must ensure that no other global field exists with the same name. If several function modules within a function group possess global interfaces, you must define parameters with the same name identically.

if it is usefull.Plz Reward

regards

Anbu