Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Program structure →  Introductory Statements for Programs 

TYPE-POOL

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


TYPE-POOL tpool. 

Effect

The statement 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 TYPE-POOL. 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

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.


Notes

  • 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-POOLS before its elements could be accessed statically or dynamically. This restriction is now obsolete. The statement TYPE-POOLS is no longer necessary.

Example

Type groups with the definition of a table type.

TYPE-POOL mytgr.
TYPES mytgr_spfli_tab TYPE HASHED TABLE
                      OF spfli
                      WITH UNIQUE KEY carrid connid.