Archived discussions are read-only. Learn more about SAP Q&A

How to access ABAP system stack memory for tables/variables

Hi,

I have a problem with a user exit where I need to access a table specifically CHECK_CATSDB that is three levels below the user exit 3 in CATS. This table cannot be modified unless I can access the stack memory directly. I would prefer this than having to modify the code to do the same.

I have looked into the system call ABAP_CALLSTACK but this only returnes the stack call sequence I need something more direct like SAPCORE but I don't know how to access the table at the specific level of the stack. Anyone checked that out yet by figuring what fm SYSTEM_CALLSTACK is doing?

Sample problem:

REPORT ztest. 

DATA: gt_test TYPE TABLE OF char255,
           gs_test TYPE char255.. 

DO 10 TIMES.

  gs_test=’Root Root Root Root’.

  APPEND gs_test TO gt_test.

ENDDO. 

PERFORM my_form1. 

FORM my_form1.
  
DATA: lt_test TYPE TABLE OF char255,
           ls_test TYPE char255..

DO 10 TIMES.

  ls_test=’my_form1 my_form1 my_form1’.

  APPEND ls_test TO lt_test.

ENDDO. 

PERFORM my_form2.

ENDFORM.

FORM my_form.
* accessing the root memory for globals is easy even if it is in other calling programs
  FIELD-SYMBOLS: <lt_test> TYPE TABLE.

  ASSIGN (‘(ZTEST)GT_TEST’) TO <lt_test>
 
* problem reading local data from my_form1
  FIELD-SYMBOLS: <lt_test1> TYPE TABLE.

  ASSIGN (‘(ZTEST)??????’) TO <lt_test1>

  IMPORT <lt_test1> FROM MEMORY ID ???.

ENDFORM.


Any hints are very welcome.

Thanks,

Andreas

Edited by: Andreas Mau on May 17, 2008 12:41 AM

Edited by: Andreas Mau on May 17, 2008 12:45 AM

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question