sapdev logo background
sapdev logo sapdev logo
Comments

SAP ASSIGN CASTING UNICODE documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

Casting Field Symbols
Previously, when you used the ASSIGN feld TO CASTING ... statement, the system checked whether feld was at least the same length as the type that was assigned to the field symbol <(><<)>f>. This was done by assigning a type to the field symbol or directly specifying the type using CASTING TYPE t .
The length check that was carried out has been tightened in the syntax check in such a way, the the statement is only permitted, if the feld field is at least the same length as the type that is assigned to the field symbol <(><)>, on Unicode as well as non-Unicode systems. If this condition is not met a syntax error occurs. At runtime the system, as before, only checks that the lengths in the current system match.
If either feld or had a deep structure type, the system also checked that the type and offset of all the reference-type components in <(><)> matched those in the assigned range in feld
. (The term "reference type components" includes object references, field references, tables, and strings). The check of reference-type components has been tightened in the syntax check in such a way that the reference components must match on all platforms. A platform can contain characters one, two, or four bytes in length. At runtime the system, as before, only checks that the reference components in the current system match.
When you use the following statements on a Unicode system , it can happen that the length of str is not a multiple of the character length. This causes a runtime error.
ASSIGN str TO TYPE 'C'|'N'
ASSIGN str TO CASTING TYPE C|N
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




ASSIGN_CALC_GUIDL
ASSIGN_COMPONENT_ABEXA




comments powered by Disqus