SAP NetWeaver AS ABAP Release 751, ©Copyright 2017 SAP AG. All rights reserved.ABAP - Keyword Documentation → ABAP - Reference → Predefined Types, Data Objects, Functions, and Constructors → Predefined Data Types →
Generic ABAP Types
The following table shows the built-in generic ABAP types. A generic data type is a type not specified in full that includes multiple fully specified types. With the exception of object, all generic types can be used after TYPE for the typing of field symbols and formal parameters. When a data object is assigned to generically typed field symbols using the statement ASSIGN, or when a data object is used as an actual parameter for generically typed formal parameters for procedure calls, the system checks whether the concrete data type is compatible with the object (in other words, whether the data type is a subset of the generic type).
The only generic types that can be used after TYPE REF TO are data, for the generic typing of data references, and object, for the generic typing of object references.
|any||Any data type|
|any table||Internal table with any table category|
|c||Text field with a generic length|
|clike||Character-like (c, n, and string plus the date/time types d, t and character-like flat structures)|
|csequence||Text-like (c, string)|
|data||Any data type|
|decfloat||Decimal floating point number (decfloat16, decfloat34)|
|hashed table||Hashed table|
|index table||Index table|
|n||Numeric text with generic length|
|numeric||Numeric ((b, s), i, int8, p, decfloat16, decfloat34, f)|
|object||Any object type (root class of the inheritance hierarchy)|
|p||Packed number with generic length and generic number of decimal places|
|simple||Elementary data type including enumerated types and structured types with exclusively character-like flat components|
|sorted table||Sorted table|
|standard table||Standard table|
|x||Byte field with generic length|
|xsequence||Byte-like (x, xstring)|
Besides the built-in generic types shown in the table above, ABAP at present includes exactly one kind of self-defined generic type. A table type defined with TYPES - TABLE OF or defined in ABAP Dictionary is generic if the primary table key is not defined or is incompletely defined or if the secondary table key of the table type is generic.
Uses the built-in generic type numeric to type the input parameters of a method. Parameters with any numeric data types can be passed to the method (but no other data types).