When a program is running in SAP ECC, the "system stack" stores all global variable irrespective of what modules/programs are called in that single session.
When it's calling RFC-enabled Function Modules (FM), a new system stack is created in the called system and only the export parameters defined in the called FM can be retrieved in ECC when the called FM has finished.
Is there a way to access another system stack's global variables in ABAP?
For example, in my case:
- The FM
BAPI_MATERIAL_AVAILABILITY
in the ECC system calls via RFC the FMBAPI_APOATP_CHECK
in the APO system. - When the APO FM finishes, I want to access some global variables of the APO system stack apart from the parameters defined in the APO RFC Function module. I need to access GTC object reference in ECC system.
PS: normally we use below ABAP statement to access memory from same stack, but it doesn't work when the memory is in another system:
ASSIGN '(PrgmName)Globalvariable' TO FIELD-SYMBOLS(<lo_data>).