sapdev logo background
sapdev logo sapdev logo
Comments

SAP UNICODE OPERANDS documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

Operand Types in Unicode Programs
One of the most important differences between Unicode and non-Unicode programs is the clear distinction between character-like data objects and byte-like data objects , and the limitation on data types whose objects can be viewed as character-like. This has an effect on all statements in which character-like operands are expected, and in particular on character string and byte string processing .

Character-Like Data Objects
In Unicode programs, only the following elementary data objects are now character-like:
Data Type Meaning
c Text field
d Date field
n Numeric text
t Time field
string Text string
In addition, structures are character-like if they contain only flat character-like components (only components from the above table, with the exception of text strings).
In Unicode programs, a structure can now essentially only be used in an operand position that expects a single field if the structure is character-like. It is then handled in the same way as a data object of type c .
In non-Unicode programs, all flat structures and byte-like data objects are also still handled as character-like data objects (using implicit casting).

Note
The incorrect use of structures in operand positions is greatly restricted in Unicode programs. For example, a structure that contains a numeric component can no longer be used in a numeric operand position.

Byte-Like Data Objects
In Unicode programs, elementary data objects of types x and
xstring are byte-like. In non-Unicode programs, data objects of this type are generally handled as character-like objects. Conversely, in n
on-Unicode programs, positions in which byte processing takes place (
SET BIT , GET BIT , and the relational operators O , Z
and M ), still expect character-type data objects, while in Unicode programs only byte-like data objects are valid.

Note
In Unicode programs, the storage of byte strings in character-like containers causes problems, since the byte order of character-like data objects in Unicode systems is platform-specific. In non-Unicode systems, this only applies to data objects with numeric data types. The content of the data objects is interpreted incorrectly if a container of this type is saved persistently and is then imported to an application server with a different byte order.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




UNICODE_OFFSET_LENGTH
UNICODE_OTHERS




comments powered by Disqus