Get Example source ABAP code based on a different SAP table
• TYPE ASSIGN - obsolete • DECIMALS ASSIGN - obsolete
ASSIGN>, obsolete_casting> Short Reference >
ABAP_SYNTAX_OBS ... ${ TYPE name $}> $| ${ $[TYPE name$] DECIMALS dec $} ...>
ABAP Addition 1 ... TYPE name> 2 ... DECIMALS dec>
What does it do? This form of the addition casting_spec>> of the statement ASSIGN>>, in which TYPE> or DECIMALS> is specified without the addition CASTING>, is not allowed in classes. Furthermore, it cannot be used at the same time as the statement INCREMENT> in mem_area>> or with the addition RANGE >>. However, the field symbol can be typed using the addition STRUCTURE >> of the statement FIELD-SYMBOLS>>.
Latest notes: The addition ELSE UNASSIGN >> cannot be used together with these obsolete additions of the ASSIGN> statement. ABAP_HINT_END
ABAP Addition
What does it do? After TYPE>, a single character character-like data object name> 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:
If the field symbol <(><)>> is typed completely or in parts, the typing> must match the ABAP type specified after TYPE>. The assigned memory area is cast to the type of the field symbol.
If the field symbol is typed completely generically, the type of the assigned memory area is cast to the ABAP type specified after TYPE >.
Latest notes: The specification of the built-in types b> and s> using b> or s> is an exception to the rule that these cannot be specified in statements. It is only possible in these obsolete variants. ABAP_HINT_END
ABAP_EXAMPLE_ABEXA Casting Built-In Data Types> ABAP_EXAMPLE_END
ABAP Addition
What does it do? A numeric data object dec> must be specified after DECIMALS >. For the casting>, the data type p> is used. Here, the number of decimal places> is determined by the content of dec>. TYPE> does not need to be specified for DECIMALS>. If TYPE> is specified, name> must contain the data type P>, which is used anyway.