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 i
As the RFC connection is not automatically closed after the call, the memory of the user session is retained, right after this call, so you may call a custom RFC-enabled function module that you create in the APO system, that accesses the memory you wish and return its value. Note that an object reference cannot be passed via RFC.
So that you better understand, I adapted the official figure about memory areas to show how a RFC call reuses the memory when the connection is not closed between 2 ABAP systems:
Legend (arrows "1" and "2"):