SAP DATA SIMPLE ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• DECIMALS CONSTANTS
• LENGTH CONSTANTS
• DECIMALS STATICS
• LENGTH STATICS
• DECIMALS CLASS-DATA
• LENGTH CLASS-DATA
• DECIMALS DATA
• LENGTH DATA

DATA, TYPE abap_type
Short Reference

ABAP_SYNTAX
DATA ${ ${var$[(len)$] TYPE abap_type $[DECIMALS dec$]$}
$| ${var $[TYPE abap_type $[LENGTH len$] $[DECIMALS dec$]$]$} $}
$[VALUE val$|${IS INITIAL$}$]
$[READ-ONLY$].

What does it do?
By specifying a built-in data type abap_type, an elementary variable var is defined. For abap_type, all built-in data types can be used, except for the internal types b and s .
The syntax and meaning of LENGTH, len, DECIMALS, and dec are identical to the definition of elementary data types using TYPES and must be specified within the specified areas. Here, however, they are used to create a bound data type. If len or dec are not specified for the ABAP types c, n, p, and x, the bound type is created using the type-specific standard length and, for p, without decimal places.



Latest notes:

For reasons of legibility, it is best to include all information and always use the addition LENGTH instead of parentheses to specify the length len.
The non-specifiable internal types b and s can be applied by referencing the built-in data types INT1 and INT2 from the ABAP Dictionary.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
These statements declare three variables and set their start values.
ABEXA 00187
ABAP_EXAMPLE_END

Return to menu