‎2007 Jan 30 9:55 AM
‎2007 Jan 30 9:58 AM
Use INSERT <WA> INTO TABLE <HAS_ITAB>.
This is the most appropriate type for any table where the main operation is key access.
You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key.
Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
‎2007 Jan 30 9:58 AM
Use INSERT <WA> INTO TABLE <HAS_ITAB>.
This is the most appropriate type for any table where the main operation is key access.
You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key.
Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
‎2007 Jan 30 10:00 AM
Hello,
U can try like this.
HASHED TABLE:
The new entry is placed in the internal hash administration of the table according to the table key. The key values are taken from the specifiedwork area wa or the header line of the table. The runtime required remains constant, since it does not depend on the number of table entries. The key must be unique.
Vasanth
‎2007 Jan 30 10:00 AM
Hi ,
check this:
types: begin of typ_pernr,
pernr like pa0001-pernr,
ename like pa0001-ename,
end of typ_pernr.
data: ls_pernr type typ_pernr,
lt_pernr type hashed table of typ_pernr with unique key pernr.
...
select pernr ename into table lt_pernr from pa0001.
...
loop at itab.
read table lt_pernr with table key pernr = itab-pernr
into ls_pernr.
write: ls_pernr-ename, itab-data.
endloop.
regards,
keerthi
‎2007 Jan 30 10:01 AM
Hi,
Defines the table as one that is managed with an internal hash procedure. You can imagine a hashed table as a set, whose elements you can address using their unique key. Unlike standard and sorted tables, you cannot access hash tables using an index. All entries in the table must have a unique key. Access time using the key is constant, regardless of the number of table entries.
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 oe INSERT itab within a LOOP) are not allowed.
Thanks,
Shankar