ABAP Data Type Reference
ABAPNewComplete reference for all ABAP built-in data types: C, N, D, T, I, F, P, STRING, XSTRING and more. Includes length, range, default values, and usage examples.
| Type | Category | Default Len | Max Len | Default Value | Example |
|---|---|---|---|---|---|
| C | Character | 1 | 65535 | SPACE | DATA lv_name TYPE c LENGTH 40. |
| N | Numeric Text | 1 | 65535 | 000...0 | DATA lv_matnr TYPE n LENGTH 18. |
| D | Date | 8 | 8 | 00000000 | DATA lv_date TYPE d. |
| T | Time | 6 | 6 | 000000 | DATA lv_time TYPE t. |
| I | Integer | 4 bytes | 4 bytes | 0 | DATA lv_count TYPE i. |
| INT8 | Integer | 8 bytes | 8 bytes | 0 | DATA lv_big TYPE int8. |
| F | Float | 8 bytes | 8 bytes | 0.0 | DATA lv_rate TYPE f. |
| P | Packed Decimal | 8 | 16 | 0 | DATA lv_amount TYPE p LENGTH 10 DECIMALS 2. |
| DECFLOAT16 | Decimal Float | 8 bytes | 8 bytes | 0 | DATA lv_val TYPE decfloat16. |
| DECFLOAT34 | Decimal Float | 16 bytes | 16 bytes | 0 | DATA lv_val TYPE decfloat34. |
| X | Hex/Raw | 1 | 65535 | 0x00... | DATA lv_raw TYPE x LENGTH 16. |
| STRING | String | Dynamic | Memory limited | '' | DATA lv_text TYPE string. |
| XSTRING | String | Dynamic | Memory limited | (empty) | DATA lv_blob TYPE xstring. |
| UTCLONG | Timestamp | 8 bytes | 8 bytes | Initial | DATA lv_ts TYPE utclong. |
Click a row for more details. Types marked with dynamic length allocate memory on the heap.
Advertisement
About ABAP Data Type Reference
ABAP's built-in type system (C, N, D, T, I, F, P, STRING, XSTRING...) has quirks that trip up even experienced developers β P fields need explicit decimal places, N is not the same as a number, and F loses precision that P doesn't. This reference lists every built-in type with its length rules, valid range, default value, and a realistic usage example so you can pick the right type without guessing.
How to use this tool
- Browse or search for a data type by its ABAP keyword (C, N, P, etc.) or by name (string, integer, date).
- Check the length and decimal rules β some types like P require you to specify DECIMALS explicitly.
- Read the usage example to see the type declared with realistic field names.
- Compare types side by side when deciding between similar options, like P vs F for currency values.
All processing happens locally in your browser. No data is sent to any server. Your SAP code and business data remain private at all times.
Frequently Asked Questions
What is the difference between ABAP type C and STRING?
Type C is a fixed-length character field (1β65535 chars), padded with spaces, stored inline in the structure. STRING is a dynamic-length text that lives on the heap. Use C for database fields and string literals with known max length; use STRING for dynamically built text.
Which ABAP type should I use for decimal numbers?
Use type P (packed decimal) with DECIMALS for financial calculations β it is exact. Use type F (floating point) only for scientific/engineering values where rounding is acceptable. Avoid F for money.
What is the ABAP_BOOL type?
ABAP_BOOL is a type alias defined in the ABAP_TYPECODES include, equivalent to type C length 1. Its valid values are abap_true ('X') and abap_false (space). Use it for boolean flags in modern ABAP code.
Advertisement