Ansicht
Dokumentation
ABAPTYPES_TABKIND - TYPES TABKIND
PERFORM Short Reference General Material DataThis documentation is copyright by SAP AG.
TYPES, tabkind
... ${ ${$[STANDARD$] TABLE$}
$| ${SORTED TABLE$}
$| ${HASHED TABLE$}
$| ${ANY TABLE$}
$| ${INDEX TABLE$} $} ...
Additions
1. ... $[STANDARD$] TABLE
2. ... SORTED TABLE
3. ... HASHED TABLE
4. ... ANY TABLE
5. ... INDEX TABLE
Effect
Defines the table category of an internal table. Possible specifications:
- Non-generic table categories
- STANDARD TABLE for standard tables
- SORTED TABLE for sorted tables
- HASHED TABLE for hashed tables
- Generic table categories
- ANY TABLE covers all table categories
- INDEX TABLE of index tables (standard tables and sorted tables)
The addition STANDARD is optional for standard tables.
Note
The additions of the statement TYPES listed above are language element additions for defining table categories. They are not to be confused with the
generic ABAP types with the same name.
Addition 1
$[STANDARD$] TABLE
Addition 2
SORTED TABLE
Addition 3
HASHED TABLE
Effect
The non-generic table categories specify the internal administration and primary access type for an internal table in ABAP programs:
- Standard tables are managed internally in the system using a
primary table index. New lines are either appended to the table or inserted at specific positions.
- Like standard tables, sorted tables are also managed using a
primary
table index. The entries in this index are always sorted by the primary table key. The sort order
is ascending and corresponds to the result of the statement SORT with no additions. The sorting is based on the
comparison rules for the data types of the key fields.
- Hashed tables are managed by a hash algorithm. There is no
primary
table index. The entries are not ordered in the memory. The position of a line is calculated from a key specification using a hash function.
Note
For non-generic table categories, the definition of the table key key determines whether the defined table type is generic.
Example
Declaration of two internal tables with the elementary line type string. The table words
is a standard table with an empty key. The table sorted_words is a sorted table with the explicitly
defined primary key table_line, that is, the entire table line. When table words is assigned to table sorted_words, the lines are sorted in ascending order according to their content.
Addition 4
ANY TABLE
Addition 5
INDEX TABLE
Effect
The generic table categories define a generic table type that can only be used for typing formal parameters and field symbols:
- ANY TABLE covers all table categories
- INDEX TABLE covers standard tables and sorted tables
Note
A generic table type must not be used as a component of a structured type.
Example
Definition of a generic table type index_table for index tables. In the method meth, an index access can be performed on the parameter para typed using this type. Only index tables can be passed to this parameter. If there is not at least one line in the internal table, the method is exited.
BAL_S_LOG - Application Log: Log header data BAL Application Log Documentation
This documentation is copyright by SAP AG.
Length: 6677 Date: 20240425 Time: 193024 sap01-206 ( 78 ms )