TYPE-POOL introduces a
type group called
tpool. It must be the first statement of a type group after any
include programs are resolved. 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
Here, 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 you can 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, you must ensure 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
TYPE-POOLSstatement before 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.