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
1/ How do u apprach if error occur in sending idocs ? 2/ where u assigned process code ?
What is an internal table?
What is time constraint ? : abap hr
What are the rules to create a BAPI?
How to debug a script in abap?
Does the bdc-insert function allow multiple transactions to be processed by sap? : abap bdc
What is the step-by-step process to create a table in data dictionary? : abap data dictionary
Difference between .Include and .append?
What are number ranges?
In Smartforms or ADOBE Forms Can we get text from standard table in verticle form? if yes, How?
What is the disadvantage of a call by reference? : abap modularization
What is alv programming in abap?
Why bapi need then bdc ? : abap bdc
What are the abap/4 commands that link to a layout set?
How do you find the information on the current screen? : abap bdc