Question: If a program (eg.: ZXYZ) calls a function module, can I access memory variables that are available in ZXYZ, but are not passed to the function module?
Answer:Yes!!!
Here is a sample code to access an internal IT_DATA from ZXYZ
===============
DATA: var_name(30) TYPE c VALUE ‘(ZXYZ)IT_DATA[]’.
TYPES: BEGIN OF st_data,
**** The same definition as IT_DATA in program
END OF st_data.
DATA: wa_data TYPE st_data.
FIELD-SYMBOLS: TYPE ANY TABLE.
ASSIGN (var_name) TO .
LOOP AT INTO wa_data.
WRITE : / wa_data.
ENDLOOP.
===============