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: 

Global variable in a function group is saved in SAP memory or abap memory?

Former Member
0 Kudos

In my debugging, i found the global variables value can not be accessed in some cases for the Function modules in the same function group.

So i want to confirm if the value of gloable variables is only saved in abap memory or SAP memory.

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

None of them abap memory is for export/import memory id, and sap memory is for set/get parameter id

Maybe your issue is about parameters from function modules defined with a global interface (obsolete, but old function module may still have them). You can access them only when the function module is in the stack (it's a kind of global field symbol pointing to a local data object i.e. the parameter).

There can be other possibilities, but I guess the previous

2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

None of them abap memory is for export/import memory id, and sap memory is for set/get parameter id

Maybe your issue is about parameters from function modules defined with a global interface (obsolete, but old function module may still have them). You can access them only when the function module is in the stack (it's a kind of global field symbol pointing to a local data object i.e. the parameter).

There can be other possibilities, but I guess the previous

Former Member
0 Kudos

Hello Rio Chang,

As correctly pointed by Sandra, the global variables value is saved neither in ABAP memory nor SAP Memory.

I suppose you have a top include with all the global data declaration, used by all Function modules in the function group. The values of these variables are saved in temporary memory at run time, and are available for the particular session.

Also check that global variables in one function module are not cleared, if you want to use the same values is another function module as well.

Please elaborate the issue further so we can understand and respond better.

You may visit the below link for another chain on global variables:

http://scn.sap.com/thread/1066150

Thanks and Regards,

Sheily Babel.