SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Assignments → Special Assignments →
destination1 = destination2 = ...
Syntax
destination1 = destination2 = ... = destination = rhs.
Effect
The assignment operator = can be used to perform multiple assignments within a single statement. This statement is the same as:
destination = rhs
... = destination
destination2 = ...
destination1 = destination2.
The same settings can be specified for rhs as for the simple assignment. An existing variable can be specified for destination, but no inline declarations.
Note
Any conversions are performed in every single assignment, which means that a value assigned to a data
object on the left side may be converted more than once if the operands have different data types. To
assign the value of lhs to different data objects with one conversion each, multiple statements are needed.
Example
After the assignments, all data objects in question are given the name "Hugo".
DATA: name TYPE string,
name1 TYPE string,
name2 TYPE string,
name3 TYPE string.
name = `Hugo`.
name3 = name2 = name1 = name.