ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Character String and Byte String Processing
&&= - Calculation Assignment
Other versions:
7.31 | 7.40 | 7.54
Syntax
lhs &&= rhs.
Effect
Calculation assignment with the string assignment operator &&=.
This assignment works in the same way as the following assignment of a string expression:
lhs = lhs && rhs.
The result of the expression rhs is concatenated with the content of lhs and the result is assigned to lhs.
The following applies to the operands lhs and rhs:
-
lhsis a result position and the following can be specified (if character-like):
-
rhsis a character-like expression position and the following can be specified (if character-like):
# is not currently possible in constructor expressions.
Numeric expressions and
bit expressions cannot be specified.
Notes
-
No inline declarations are possible for
lhs. -
Calculation assignments can currently only be specified as standalone statements. They cannot be used
in expressions, for example after
NEXTin the reduction operatorREDUCE. -
See also the addition assignment operator
(
+=), the subtraction assignment operator (-=), the multiplication assignment operator (*=), and the division assignment operator (/=).
Example
After the calculation assignments the variable text has the value 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,.
DATA text TYPE string.
DO 10 TIMES.
text &&= |{ sy-index }, |.
ENDDO.