SAP ABAP uses various data types in the work areas for data, the different data types are as follows.
Types of data types
- Elementary data types
- Complex data types
- Reference data types
- Fixed Length
- Variable Length
Keyword | Data Type | Example |
C | Text field | “Hello World” |
N | Numeric | 00500 |
D | Date | “20171201” |
T | Time | “233010” |
P | Packed Number | 200.50 |
I | Integer | 500 |
F | Float point number | 4e5 |
Keyword | Type |
STRING | Character Sequence |
XSTRING | Byte Sequence |
SAP delivers predefined data types with length and templates, where the field length is defined in bytes.
Data Type | Int. field length | Valid field length | Initial value | Description |
Character Types | ||||
C | 1 | 1 – 65535 | ‘….’ | It is a text field for alphanumeric characters |
N | 1 | 1 – 65535 | ‘0 … 0’ | Numerical text field for only numeric characters |
D | 8 | 8 | ‘00000000’ | Date field allows in format YYYYMMDD |
T | 6 | 6 | ‘000000’ | Time field allows in format HHMMSS |
Numeric Types | ||||
I | 4 | 4 | 0 | For Integers (Whole numbers) |
F | 8 | 8 | 0 | For floating point number |
P | 8 | 1 – 16 | 0 | Packed decimal numbers |
Complex types : – Complex types includes structures types and table types.
- Data type N is not a numeric type, type N objects con only contains numeric characters (0…….9), but they are not represented as internally as numbers.
- The value range of data type I number is -2**31 to 2**31-1 and consists only whole numbers. Data type I (Integer) is used for the values of counters, number of items, indexes, etc.
- Data type P allows digits after the decimal point. The number of decimal place is generic and is determined in the program. Type P can be used for distance,weights, etc.
- The Non-numeric data types such as C (Text field), D(Data), N(Numeric), T (Time) are character types. Fields in this type are allowed to enter characters and it takes enough memory for coding.
Reference Types : – Reference types includes data references and object references.
Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP S/4 HANA Logistics Team Lead
Contact : serkurumsal@yandex.com
Social Plugin