How to create hashed tables?and its purpose
Answer Posted / buddula15
Hashed Table:
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.Hashed table
is useful when your have to work with very big internal
table and to read it with "READ TABLE WITH KEY ..." .
Sample code for Hashed table Creation :
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.
| Is This Answer Correct ? | 19 Yes | 2 No |
Post New Answer View All Answers
What are the time related infotypes? : abap hr
What has to be done to the packed fields before submitting to a BDC session.
What are the aggregate objects in the data dictionary? : abap data dictionary
What are the function module in bdc?
What are number ranges?
How will you define org structure in MM?
can anybody give me functional specification (or table name & field names) of stock analysis report, work in progress report,generating vendor detailed list
please any one can tell me How to validate the data in Table maintinance generator?how can u validate the table field values if u r entering the data into fields .it shows record is wrong?wher we can done validation in table maitenance generator before getting the data as out ?
What is the client concept in sap?
Difference between BDC vs Direct Loads?
What is a function group? : abap modularization
What is the difference between select statement and provide statement ? : abap hr
What is direct input method ?
What are the user groups?
What is alv programming in abap? When is this grid used in abap? : abap hr