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 global variables

milascon_daniel
Participant
0 Kudos

Hi,

all variables declared in LZFCT_GRP_NAMETOP are globals, yes? All function modules have acces to those globals?

If this is true, than i should not use same variables in 2 function modules, right?

Thank you.

7 REPLIES 7

Former Member

Hi,

Global variable are stored in comman memory.

you can use the variable separetly but not simultaneiusly.

If you change the contents of variable in one Function module the same changes will reflect in another Function module as well.

Thanks

Sathish

Former Member
0 Kudos

Hi,

all variables declared in LZFCT_GRP_NAMETOP are globals, yes? All function modules have acces to those globals?

Yes, All are global varaibles

If this is true, than i should not use same variables in 2 function modules, right?

No, You can use same variables in two function modules, But after use of varaibles, you have to clear varaibles.

Regards

Jana

0 Kudos

If this is true, than i should not use same variables in 2 function modules, right?

No, You can use same variables in two function modules, But after use of varaibles, you have to clear varaibles.

I referred to the fact to use same variable in 2 fct modules in same time.

ok, i should be very carefull with globals variables.

many thanx my friends!

former_member755502
Participant
0 Kudos

Hi,

Yes, you can access global variables across different function modules. Thus if you are not going to use the same variables in different function modules then what is the use of declaring them as global.

Thank you.

JozsefSzikszai
Active Contributor
0 Kudos

hi,

yes - is the answer to all of your questions

hope this helps

ec

Former Member
0 Kudos

Hi Dan M,

The variables are declared globally.

But each time, a function module executed, new set of global variables will be created.

It is not like that, a global variable changed by one function module can be accessed by other function module in the same function group with the value changed.

Declaration alone global.

Variables used by function modules separately.

Regards,

R.Nagarajan.

former_member755502
Participant
0 Kudos

Note - You should not clear global variables if it is not required explicitly; as we use global variables to get the values which are modified by some other function modules. It is one way of exchanging data across multiple function modules.

Thank you.