Predefined ABAP Types
The table below shows the predefined ABAP types. Additional attributes can be found under value ranges and initial values.
Type |
Length |
Standard length |
Description |
b |
1 Byte |
|
1 byte integer (internal) |
c |
1 to 65,535 characters |
1 character |
Text field |
cursor |
as i |
as i |
Database cursor |
d |
8 characters |
|
Date field |
f |
8 bytes |
|
Floating point number |
i |
4 bytes |
|
4 byte integer |
n |
1 to 65,535 characters |
1 character |
Numeric text |
p |
1 to 16 bytes |
8 bytes |
Packed number |
string |
variable |
|
Text string |
s |
2 bytes |
|
2 byte integer (internal) |
t |
6 characters |
|
Time field |
x |
1 to 65,535 bytes |
1 byte |
Byte field |
xstring |
variable |
|
Byte string |
These types are predefined in every ABAP program.
- All predefined ABAP types in this table are elementary.
- Apart from the types b and s, the predefined ABAP types can also be used to define your own data types and data objects and for
typing. The types
b and s cannot be specified directly in ABAP
statements. Self-defined data types and data objects in ABAP programs are of the data type
b and s if they are defined with reference to data elements to the ABAP Dictionary which are of the external data types INT1 or INT2.
- The program-globally predefined data type cursor is
currently synonymous with the predefined ABAP type i. This is required for the declaration of a cursor variable for
database cursor handling.
- All predefined ABAP types for which a length interval is specified in second column in the table
are generic, which means that the length is not part of the type description. For the type p, the
fractional portion is indefinite as well as the length.
- The entries in the standard length column specify the length that is used for the corresponding generic data type when declaring data objects, if no explicit length is specified in the relevant statement.
- In Unicode systems, the length
must either be specified in characters and bytes. In non-Unicode systems, the length of a character
is one byte, but in Unicode systems the length of a character depends on which Unicode character representation is used.