Skip to Content
0
Former Member
Jan 28, 2008 at 07:53 PM

FIELD-SYMBOL: Reading a column dynamically

1325 Views

Hello everybody!

I'm trying to get dynamically a column value from a field-symbol structure.

Building a a field-symbol and assing values to its columns it is ok.

Reading it dynamically is showing to be the fun stuff.

Let me show you some example-code of what i'm trying to do

(1) starting point:

* building field-symbol structure and value assign
...
ASSIGN COMPONENT 'MY_COLUMN'   OF STRUCTURE <DYN_WA_MY_TABLE> TO <L_FIELD>. 
<L_FIELD> = 'this is my value'.
...
* end building field-symbol


*Reading field symbol column by name (the good stuff)

data: my_column_name(10) type C, my_column_value(100) type C.

my_column_name = 'MY_COLUMN'. "the name of the column I want to read

my_column_value = <DYN_WA_MY_TABLE>-[my_column_name].


* my_column_value must have 'this is my value'.

Hope this helps. But this was the best way I've found to show you my issue.

Thank you very much for your attention.

Code Formatted by: Alvaro Tejada Galindo on Jan 28, 2008 6:17 PM