Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Built-In Types, Data Objects, Functions, and Constructors →  Predefined Data Types →  Built-In ABAP Types 

Predefined Byte-Like Types

The data objects of the byte-like data types are used to include byte strings.

Other versions: 7.31 | 7.40 | 7.54

Properties

Type Length Standard Length Name
x 1 to 524,287 bytes 1 byte Byte field
xstring Variable   Byte string

Value Ranges and Initial Values

Type Value Range Initial Value
x Any byte values, hexadecimal 00 to FF Hexadecimal 00
xstring As for type x Empty string with length 0


Notes

  • The type x, for which a length interval is specified in the second column in the first table, is generic, which means that the length is not part of the type description. The entry in the Standard Length column specifies the length used in declarations of data objects when using types with generic lengths, if no explicit length is specified in the relevant statement.

  • The system class CL_ABAP_ELEMDESCR contains a constant TYPE_X_MAX_LENGTH for the maximum length of the type x.

Example

Declares a byte string of the built-in ABAP type xstring for the result of a functional method. This declaration could also be made inline on the left side of the assignment.

DATA hex TYPE xstring. 
hex =  cl_abap_conv_codepage=>create_out(  )->convert( `...` ).