Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing Internal Data →  Assignments →  Assignment and Conversion Rules →  Conversion Rules for Elementary Data Objects 

Character-Like Source Fields

The following special formats must be respected in conversions of character-like data objects to numeric data objects:

Other versions: 7.31 | 7.40 | 7.54


Example

Conversion of the text string 053000 to different target types. The type-friendly formatted output is 53000, 0000053000, 053000, 053000.

DATA str TYPE string VALUE `053000`. 

TYPES n10 TYPE n LENGTH 10. 
cl_demo_output=>display( 
  |i:           { CONV i( str ) }\n| && 
  |n LENGTH 10: { CONV n10( str ) }\n| && 
  |xstring:     { CONV xstring( str ) }\n| && 
  |t:           { CONV t( str ) }\n| ).

Continue

Source Field Type c

Source Field Type n

Source Field Type string

Representation of Numeric Values in Character-Like Fields

Representation of Time Stamps in Character-Like Fields