Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

retrieving internal table info. during runtime from callstack

Former Member
0 Likes
4,344

Hi,

i need to retireve internal table info in an exit during runtime. i'm able to see the values in that internal table from the corresponding program in call stack ,however, i couldnt get this table inside my exit.

how to access this internal table?

Thanks,

venu.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,601

You can use field symbols to do this. In your user exit, you need to do something like this.


data: field(50) type c.
data: xmarc type marc.
field-symbols: <imarc> type marc_upl_tt.

* Assign an internal table
  field = '(ZRICH_0006)IMARC[]'.
  assign (field) to <imarc>.

* You can now access IMARC from other program
  loop at <imarc> into xmarc.
    write: / xmarc-werks.
  endloop.


Regards,

Rich Heilman

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,602

You can use field symbols to do this. In your user exit, you need to do something like this.


data: field(50) type c.
data: xmarc type marc.
field-symbols: <imarc> type marc_upl_tt.

* Assign an internal table
  field = '(ZRICH_0006)IMARC[]'.
  assign (field) to <imarc>.

* You can now access IMARC from other program
  loop at <imarc> into xmarc.
    write: / xmarc-werks.
  endloop.


Regards,

Rich Heilman

Read only

Former Member
0 Likes
2,601

Rich,

Thanks. it solved my problem.

do we have any documentation where i can find advanced topics related to field symbols.

Thanks,

venu.

Read only

0 Likes
2,601

Not that I know, little tricks like this will come with experience and hanging out in the ABAP forum on SDN.

Regards,

Rich Heilman

Read only

0 Likes
2,601

This should be made a sticky (or be put into the wiki) I keep forgetting how to do this