ABAP Keyword Documentation →  ABAP − Reference →  Obsolete Language Elements →  Obsolete Assignments → 

ASSIGN - obsolete_casting

Short Reference

Obsolete Syntax

... { TYPE name }
  | { [TYPE name] DECIMALS dec } ... .

Additions 1. ... TYPE name 2. ... DECIMALS dec

Effect

This form of the addition casting_spec for the ASSIGN statement in which you specify TYPE or DECIMALS without the CASTING addition, is not allowed in classes. Furthermore, it can neither be used together with the statement INCREMENT in mem_area nor with the addition RANGE. However, the field symbol may be typed using the obsolete addition STRUCTURE of the FIELD-SYMBOLS statement.

Addition 1

... TYPE name

Effect

After TYPE, a character-like data object name of length 1 is expected, which must contain exactly one of the case-sensitive letters "C", "D", "F", "I", "N", "P", "T", "X", "b", or "s" when the statement is executed. These letters label the respective built-in ABAP types and have the following effects:

Note

The specification of the predefined types b and s using "b" or "s" is an exception to the rule that these cannot be specified in statements, and is only permitted in these obsolete variants.

Example

See Casting Predefined Data Types.

Addition 2

... DECIMALS dec

Effect

After DECIMALS, you must specify a numeric data object dec. For the casting, data type p is used; the size of the fractional portion is determined by the content of dec. You do not need to specify TYPE for DECIMALS. If you specify TYPE, name must contain data type "P", which is used anyway.

Example

See Casting Decimal Places.