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
The loop-endloop on extract datasets can be used without any kind of errors. State true or false. : abap modularization
What is the difference between field-group header and other field groups?
What is direct input method ?
What are the attributes of the data in data dictionary? : abap data dictionary
What are the basic objects of the data dictionary?
There is a situation where there is a field "MATERIAL DESCRIPTION" in say 20 display only transaction. You want that whenever user opens any of these transaction, this particular field is masked with ****. But table does not holds ****. It holds the actual value. What are different ways of doing it? Which is the best way.
What is roll area?
How do we handle multiple line items in BDC's.
Explain enhancements
What is the maximum number of match code id's that can be defined for one match code object ?
What are subroutines? : abap modularization
what are the main technical differences between oracle and sap? it would be more helpful to me if get this answer...
What are the buffering options in abap?
What are the 3 types of function modules in sap?
What is alv programming in abap? When is this grid used in abap? : abap hr