The corresponding built-in ABAP types are
These are the dynamic equivalent of the data types
x, which define text fields or byte fields of fixed length.
- Text strings and text fields contain character strings. Their common generic type is
- Byte strings and byte fields contain byte strings. Their common generic type is
Unlike a text field or byte field, the length of a string is not defined statically, but is variable and adapts to the current content of the data object at runtime. Internally, this uses dynamic memory management (see Memory Management for Deep Data Objects). The maximum size of a string is determined by the profile parameter ztta/max_memreq_MB (see Maximum Size of Dynamic Data Objects). The initial value of a string is the empty string with length 0. Any assignments between strings with the same type produce sharing.
In contrast to text fields, trailing blanks are respected in text strings. There is a special text string literal for text strings. As with byte fields, there is no special literal for byte strings in the current release.
Strings, like internal tables, can be stored in data clusters. In ABAP Dictionary, strings can have the built-in data types SSTRING, STRING, and RAWSTRING. These can also be the types of table fields in database tables (subject to certain restrictions).
Inline declaration of a text string
carrier_list for adding a comma-separated list of character-like data.
SELECT carrid FROM scarr INTO TABLE @DATA(carrier_tab). CONCATENATE LINES OF carrier_tab INTO DATA(carrier_list) SEPARATED BY `, `. cl_demo_output=>display( carrier_list ).