Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Character String and Byte String Processing →  Character and Byte String Processing - Overview 

Operands in Character String and Byte String Processing

Other versions: 7.31 | 7.40 | 7.54

Operands in Character String Processing

In character string processing (defined by the addition IN CHARACTER MODE in overloaded statements) and in statements that only support character string processing, the relevant operands must be character-like. This is because the operands are processed by character and the repository of the characters in the memory is dependent on the code page used. This condition is vital to ensure that character string processing functions correctly.

In Unicode programs, only data objects, return values, or results with the character-like data types c, d, n, t, and string, or structures with only character-like components are permitted as character-like operands. Data objects with the types d, n, and t and structures with purely character-like components are handled like data objects with the type c.


Notes

  • If the character-like data objects d, n, and t are used in character string processing, it must be noted that the conversion rules appropriate to type do not apply to the assignment of interim results to target fields; instead the conversion rules for data type c apply.

  • In obsolete non-Unicode programs, any flat structures and byte-like data objects are handled like character-like data objects with the type c (implicit casting is used). This enables character string processing of byte strings in non-Unicode programs to produce the same results as explicit byte string processing in Unicode programs before the introduction of the addition IN BYTE MODE, if the statement is suitable as defined in the table of statements.

Operands in Byte String Processing

In byte string processing (defined by the addition IN BYTE MODE in overloaded statements) and in the statements GET BIT and SET BIT, the relevant operands must be byte-like. This is because the operands are processed by byte.


Note

In obsolete non-Unicode programs, the operands of the statements GET BIT and SET BIT can also be character-like.