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

Former Member
0 Likes
4,437

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
Read only

Former Member
1,497

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

Read only

Former Member
0 Likes
1,497

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

Read only

0 Likes
1,497

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!

Read only

former_member755502
Participant
0 Likes
1,497

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.

Read only

JozsefSzikszai
Active Contributor
0 Likes
1,497

hi,

yes - is the answer to all of your questions

hope this helps

ec

Read only

Former Member
0 Likes
1,497

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.

Read only

former_member755502
Participant
0 Likes
1,497

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.