Skip to Content
0
Jul 16, 2008 at 03:41 PM

How do I use "key table_line" method for reading an itab?

4636 Views

I have a hashed itab called c_th_data. The structure of the table is determined at runtime. I want to do a read on that table using a line from another table with the same structure. For simplicity sake, though, here is my example:

data:

c_th_data type hashed table.

field-symbols:

<fs_c_th_data> type any.

loop at c_th_data assigning <fs_c_th_data>.

read table c_th_data transporting no fields

with table key table_line = <fs_c_th_data>.

endloop.

When I run this, I get the error "Illegal key specification when accessing a key table." Any ideas as to what I am doing wrong?

Thanks for any help!

Dustin