Get Example source ABAP code based on a different SAP table
• = ABAP_STRING_EXPR
=>, String Expression
ABAP_SYNTAX result = string_exp>.>
What does it do? If a string expression> string_exp>> is specified on the right side of the assignment operator =>>, its result of type string> is calculated and assigned to the left side result>. The following can be specified for result>:
A variable> that has type string> or to whose data type the result can be converted.
An inline declaration DATA(var)>> or FINAL(var)>>. The data type of the declared variable var> is string>.
Latest notes:
In the following example, the result result> is a variable with the type string>, and strings are appended to this variable on the right side that cannot be recognized as dependent on result> by the compiler: result = result dobj1 dobj2 ...> result = |result...{ dobj1 ... }...{ dobj2 ... }...|.> Here, no interim result is created but it is directly appended to the result>. In all other cases, that is, data types other than string> or when expressions or functions are appended on the right side, an interim result is created first and then assigned. This optimization improves performance, but it must be ensured that, especially in loops, this improvement is not canceled out by using expression or functions on the right side, even if they are not dependent on result>). See also the Performance Note> for string expressions.
See also calculation assignment > with the operator **=> >. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 The first assignment declares a target field of the type string> inline and assigns the chained text 12> to it. The second assignment converts the chained text 12> to the number 12. ABEXA 01016 ABAP_EXAMPLE_END