Hi,
You can 'grab' the memory from any calling program --> as long as the variable you wish to use is defined globally in the calling program i.e. not in the top of a function module, but within the top include.
The syntax is as you have defined, but I have found that it doesn't work unless you define the value as a variable with a fixed value.
Try this code.
field-symbols: <fs> type table.
data tab type table of MHIO.
data: l_variable(40) value '(SAPLCOIH)MHIO_TAB[]'.
* Retrieve values from calling program
assign (l_variable) to <fs>.
move <fs> to tab.
This will grab the internal table and allow you to use the values. Unfortunately the field XCLNOT is not defined in the top include of program SAPLCOIH, but within the top of the function module. So you can't get that value. Look in the top include and see if the value is stored their within another field.
Even more scary is that you can manipulate the value in the calling program --> humph not something I would advise!!
In debug if you view the call stack and navigate to that program you should see the variable's, and their values, available to you. The only pre-condition is that they must be defined globally within that program. A good example is table declarations.
Cheers
Wob
(even more of an SAP expert than ereglam
)