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.
Showing results for 
Search instead for 
Did you mean: 

Local Memory Read

Former Member
0 Kudos

Hi All,

I have a user exit (function module) that doesn't get all the data passed to it that I need.

I know you can use ASSIGN '(PROGRAM)field' to retreive data from the active call stack but this only seems to work if the data is declared as global in the active program.

In the active call stack, about 5 levels back, there is a function that is receiving the data I need as an import parameter (IV_FIELD) but it doesn't move it or pass it to any global variable. This function is called as a new task and, therefore, there are no deeper levels on the call stack.

Does anyone know of anyway of extracting this data from 5 levels down in a call stack where it is not defined as global ?

Thanks in advance



Active Contributor
0 Kudos

Hi Jim,

I searched already for days for an option - didn't find anything.

Dynamical assign is restricted to global variables, that's it.



0 Kudos

Cheers Christian,

That's what I was afraid of.

I think there must be something at a low level that can access this kind of data. After all, it must be held in memory to be accessable to the ABAP when the stack returns.

It just appears to be protected from outside programs using ABAP.

I might send an email to SAP demanding all their programmers declare data as global !

0 Kudos

Hi James,

but maybe also SAP's programmer read SDN and know, what a dynamical assign can do

If local variables are static, then of course something is stored in memory - otherwise variables are defined at each entry (and that's the reason why this is a slow option).



0 Kudos

Hi James,

Your frustration is quite understandable. But when you say that you would have liked all the data to be global, I hope you were only kidding.

If you weren't, then I must tell you that declaring all the data in a program as global has got a lot of disadvantages. And none of them has got anything to do ABAP in particular.

Software Development is impossible without taking a modular approach. It is very important that the concept of coupling be properly understood here. Coupling is the degree to which each program module relies on each other module.

Low coupling means that one module does not have to be concerned with the internal implementation of another module, and interacts with another module with a stable interface. With low coupling, a change in one module will not require a change in the implementation of another module.

Although in order to achieve maximum efficiency, a highly coupled system is probably needed, in modern computing systems, performance can often be traded for lower coupling; the gains in the software development process are greater than the value of the gain in performance.

All the modules of a program sharing the common global data will result in what is known as <i>common coupling</i>. This increases the likelihood of errors and makes debugging an error a nightmare. And considering the amount of code we have in SAP, this can only result in disasters!!

I could have written a complete blog on the remaining disadvantages, but I hope you got the point.


Anand Mandalika.

0 Kudos

Hi Anand,

Yes, I was joking !



0 Kudos


i want read global content in stack.

how to do it.

i tried to use assign '(program)field' to

but i failed.

can u give me example how to use it.