‎2007 Nov 23 2:07 PM
I want to read next record in hashed table.
I cant use sy-index here.So how to read a next line.
I cant use with key also since its a dynamic one .
i set a counter & found the line number but how to read tht record using tht line number.
Can any one help me..
Thanks in advance.
‎2007 Nov 23 2:20 PM
Hi!
There's only 1 question yet, why are you using hashed table then? Use standard one instead...
Regards
Tamá
‎2007 Nov 23 2:23 PM
in the function module its declared as a dynamic hashed table.
if i use standard table i cant modify the data & pass it to the FM it throws type compatibility error.
Hope u understood..
Thanks.
Maya.
‎2007 Nov 23 6:07 PM
[If its possible to declare a standard table with same type as hashed table.]
Move your data to a standard table with the same Type as your dynamic hashed table.
tb_stand[] = tb_hash[].
And access the records of the standard table.
Reward Points if useful.
Regards,
Abhishek
‎2007 Nov 23 2:29 PM
Hi,
I does not make sense to read the next record in a hashed table. The order in the hashed table is irrelevant, you must come with the table key, so always read with table key, even if the table is just increased somehow.
Siegfried
‎2007 Nov 23 2:36 PM
Hi,
You can only access a hashed table using the generic key operations or other generic operations (SORT, LOOP, and so on). Explicit or implicit index operations (such as LOOP ... FROM to INSERT itab within a LOOP) are not allowed."
Hashed table is useful when your have to work with very big internal table and to read it with
"READ TABLE WITH KEY ..."
<b>Access time using the key is constant, regardless of the number of table entries</b>.
Regards,
Maha