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: 

question about a function attribute

Former Member
0 Kudos

Hi, every one.

I have a question on a attribute of function module.

There is a attribute named 'Global'. We can find it in the function builder->attributes tab->General Data.

It's a checkbox and we can set it by menu Edit->interface->Globalize parameter.

SAP help says 'If you select this field, the system declares the interface parameters in the function group globally. '.

My question is when two function which in an function group are called in the same time, these Globalize parameter will impact each other or not? Assume they have the same parameter name.

If using this Globalize parameter, is there any synchronous problem?

Hope the reply of you. Thank you.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

If u check the 'global' field, system declares the interface parameters in the function group globally. Unlike other global data, the contents of the global parameters of a function module are known only during execution of that FM.It should be ensured that no other global field exists with the same name.If several FMs in a given group possess global interfaces, parameters names should be indentical. I hope this helps.

-Tejal

3 REPLIES 3

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

And later they say 'you must define parameters with the same name identically' -> there will be overwriting of a second function module of same FM group.

I had more problems in searching unexpected data changes than I need time when defining form routines with complete parameters.

If data should be handled by several function modules, explicit global data is easier to understand -> I (personally) won't use this feature.

Regards,

Christian

Former Member
0 Kudos

Hello,

If u check the 'global' field, system declares the interface parameters in the function group globally. Unlike other global data, the contents of the global parameters of a function module are known only during execution of that FM.It should be ensured that no other global field exists with the same name.If several FMs in a given group possess global interfaces, parameters names should be indentical. I hope this helps.

-Tejal

Former Member
0 Kudos

Hi Zhenglin,

This is not to be confused with the global data variables declared in "Global Data".

If the checkbox is Checked, the interface parameters are <b>visible to all includes used by the particular function Module</b>. This reduces the hassle of passing these interface variables from one subroutine to the other if there are many nested subroutine calls or simply many subroutine calls that are not in the same include as the function module source code. However the data is released after the call is completed and so cannot be used by other function modules in the function group.

Now I am confused! Just Kidding!

Rishi