ABAP Keyword Documentation → ABAP - Reference → Program structure → Introductory Statements for Programs
Other versions: 7.31 | 7.40 | 7.54
TYPE-POOL introduces a
type group. It must be the first statement of a type group following the triggering of any
include programs. Type groups are only defined in
ABAP Dictionary in
ABAP Workbench. Here,
an ABAP program is generated automatically, including the statement
The actual name of the program of a type group in the repository does not completely match the name of the type group and is of internal relevance only.
Type groups can only contain the statements
CLASS ... DEFINITION DEFERRED PUBLIC
and the declared data types, constants, and
macros must be prefixed with the name
tpool of the type group. The elements
declared in a type group can be addressed statically or dynamically by name in every ABAP program in which the type group can be used. This is loaded when an element of a type group is first accessed.
- Types in type groups are the predecessors for general type definitions in ABAP Dictionary.
- Since it is possible to also define data types and constants in the public visibility section of global classes, type groups are obsolete and should no longer be created. Existing type groups can still be used.
To avoid conflicts in the type reference with the addition
LIKE, it must be ensured that constants in type groups do not have the same name as existing flat structures or database tables in ABAP Dictionary.
- The name of a type group may contain a maximum of five characters.
Previously, type groups had to be made known in ABAP programs using the statement
TYPE-POOLSbefore its elements could be accessed statically or dynamically. This restriction is now obsolete. The statement
TYPE-POOLSis no longer necessary.
Type groups with the definition of a table type.
TYPES mytgr_spfli_tab TYPE HASHED TABLE
WITH UNIQUE KEY carrid connid.