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
Update function modules are classified as either v1 or v2. Which type of update is performed first and in what mode (asynchronously, synchronously or locally) can each type be processed in?
Which infotype records can not be deleted ? : abap hr
How the at-user command serves mainly in lists?
Can we make use of flow logic control key words in abap/4 and vice-versa?
what is the transaction transaction for setting parameters rdisp/buffermode
Differentiate between static and dynamic step loops?
What are control tables? : abap data dictionary
How you attach search help to data element? : sap abap data dictionary
What is the function module for INDIAN PAYROLL to read table cluster for given cluster table and sequence number?
What are spa/gpa parameters (sap memory)?
How is conversion of data types done between abap/4 & external level?
What is the use of dequeue function module? : sap abap data dictionary
What is a subroutine?
What are field groups?
Write the bdc table structure? : abap bdc