SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Assignments → = - Assignment Operator → = - Assign Calculation Expressions →=, Arithmetic Expression
Syntax
result = arith_exp.
Effect
If an arithmetic expression arith_exp is specified on the right side of the assignment operator =, its calculation type is calculated and assigned to the left side result.
The following can be specified for result:
If an existing variable is specified for result, its data type is respected when determining the calculation type. If the calculation type is not the data type of result, the result is converted to the data type of the result field before the assignment is made.
Notes
Example
The first assignment is an assignment of an arithmetic expression, because of its sign. The calculation type is determined as i and result is given the value "731036", the number of days since 01.01.0001. The second assignment, on the other hand, has the same meaning as an assignment of data objects and produces the value "20020704" in result.
DATA: result TYPE string,
date TYPE d VALUE '20020704'.
result = + date.
result = date.