SAP TYPES TABCAT ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• STANDARD TABLE TYPES
• SORTED TABLE TYPES
• HASHED TABLE TYPES
• ANY TABLE TYPES
• • TABLE TYPES

TYPES, tabkind
Short Reference


ABAP_SYNTAX
... ${ ${$[STANDARD$] TABLE$}
$| ${SORTED TABLE$}
$| ${HASHED TABLE$}
$| ${ANY TABLE$}
$| ${ • TABLE$} $} ...

ABAP Addition
1 ... $[STANDARD$] TABLE
2 ... SORTED TABLE
3 ... HASHED TABLE
4 ... ANY TABLE
5 ... • TABLE

What does it do?
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
• TABLE of index tables ( standard tables and sorted tables)
The addition STANDARD is optional for standard tables.



Latest notes:

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.
NON_V5_HINTS
ABAP_HINT_END

ABAP_PGL
Use a suitable table category
ABAP_PGL_END

ABAP Addition

ABAP Addition

ABAP Addition

What does it do?
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.



Latest notes:

For non-generic table categories, the definition of the table key key determines whether the defined table type is generic.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
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 the table words is assigned to the table sorted_words , the lines are sorted in ascending order according to their content.
ABEXA 00744
ABAP_EXAMPLE_END

ABAP Addition

ABAP Addition

What does it do?
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
• TABLE covers standard tables and sorted tables



Latest notes:

A generic table type must not be used as a component of a structured type.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
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.
ABEXA 00745
ABAP_EXAMPLE_END

Return to menu