Entering content frame

Character-Type and Numeric Operands Locate the document in its SAP Library structure

Previously, there was a rule in ABAP that flat structures could be used as arguments of ABAP statements anywhere where type C single fields are expected. In Unicode programs, this is generally no longer possible. In Unicode programs, you can only use a structured field for a statement that only expects a single field if this field consists of character-type elementary types or purely character-type substructures. The structure is treated like a type C single field.

In comparison with non-Unicode systems, flat structures are now only rarely regarded as character-type and fields of the type X or XSTRING are never regarded as character-type. Additionally, flat structures are now only seen as numeric if they are purely character-type. Examples of numeric arguments are offset or length specifications such as for READ TABLE ... INDEX i. The following are examples of character-type and non-character-type structures:


BEGIN OF struc1,
  a(2) TYPE C,
  n(6) TYPE N,
  d    TYPE D,
  t    TYPE T,
END OF struc.


BEGIN OF struc2,
  a(2) TYPE C,
  b(2) TYPE C,
  x(1) TYPE X,
  i    TYPE I,
END OF struc.

Another example is a group change in the case of internal tables, caused by the keyword AT. In non-Unicode systems, type X fields to the right of the group key are treated as character-type and hence filled with an asterisk. The same type in a Unicode system, on the other hand, is filled with its initial value.


Note In the context of Structure Enhancements, you should note the categories used in the Dictionary.


Leaving content frame