One, the data statement
1.TYPE TYPE
Ex: You can declare multiple variables with a colon.
DATA: gv_num1 TYPE I,
Gv_num2 TYPE I.
2.LIKE Num (num can be a variable of any data type-field, parameter, struct, system variable, etc.)
Ex
DATA: gv_num3 like Gv_num1.
3.VALUE int
If you use the value is initial statement, the initial value of the variable is the initial value of the referenced data type.
However, when defining a fixed value, be sure to define its initial value using the value statement.
DATA: gv_num TYPE i value 123,
Gv_flag value ' X ',
Gv_val Value is initial,
Gv_idx like Sy-tabix value 45.
4LRNGTH N
Used to specify the field length, but only for C, N, P, x types
DATA: gv_num TYPE n LENGTH 2.
5.DECIMALS N
Decimals n is used to specify 1~14 decimal places only for data type P
DATA: gv_num TYPE P decimals 3.
Novice self-taught ABAP (1)--Data type