βš™οΈSAPTools
πŸ“Š

ABAP Data Type Reference

ABAPNew

Complete 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.

TypeCategoryDefault LenMax LenDefault ValueExample
CCharacter165535SPACEDATA lv_name TYPE c LENGTH 40.
NNumeric Text165535000...0DATA lv_matnr TYPE n LENGTH 18.
DDate8800000000DATA lv_date TYPE d.
TTime66000000DATA lv_time TYPE t.
IInteger4 bytes4 bytes0DATA lv_count TYPE i.
INT8Integer8 bytes8 bytes0DATA lv_big TYPE int8.
FFloat8 bytes8 bytes0.0DATA lv_rate TYPE f.
PPacked Decimal8160DATA lv_amount TYPE p LENGTH 10 DECIMALS 2.
DECFLOAT16Decimal Float8 bytes8 bytes0DATA lv_val TYPE decfloat16.
DECFLOAT34Decimal Float16 bytes16 bytes0DATA lv_val TYPE decfloat34.
XHex/Raw1655350x00...DATA lv_raw TYPE x LENGTH 16.
STRINGStringDynamicMemory limited''DATA lv_text TYPE string.
XSTRINGStringDynamicMemory limited(empty)DATA lv_blob TYPE xstring.
UTCLONGTimestamp8 bytes8 bytesInitialDATA 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

  1. Browse or search for a data type by its ABAP keyword (C, N, P, etc.) or by name (string, integer, date).
  2. Check the length and decimal rules β€” some types like P require you to specify DECIMALS explicitly.
  3. Read the usage example to see the type declared with realistic field names.
  4. 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.