SAP STRING

Get Example source ABAP code based on a different SAP table
  


ARTICLE

Strings
Strings are elementary data objects of variable length. Strings can be either text strings or byte strings. Like internal tables, strings belong to the dynamic data objects.
The corresponding predefined ABAP types are string and xstring. These are the dynamic equivalent of the data types c and x, which define text or byte fields of fixed length. Text strings and text fields contain character strings. Their common generic type is csequence. Byte strings and byte fields contain byte strings. Their common generic type is xsequence.
Unlike a text field or byte field, the length of a string is not statically determined, but rather is variable and adapts to the current content of the data object at runtime. Internally, this uses dynamic memory management (see Storage 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.
In contrast to text fields, trailing blanks are always taken into account 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 belong to the deep data types. A structure that contains a string is a deep structure and cannot be used as a character-like field in the same way as a flat structure.
Strings, like internal tables, can be stored in data clusters. Strings can also be saved in database tables. However there are certain Restrictions.