Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

ABAPTYPES_TABKIND - TYPES TABKIND

ABAPTYPES_TABKIND - TYPES TABKIND

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

TYPES, tabkind

Short Reference


... ${ ${$[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

  • Generic table categories
  • ANY TABLE covers all table categories

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.

Use a suitable table category

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.






CPI1466 during Backup   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 6677 Date: 20230207 Time: 092951     sap01-206 ( 102 ms )