Ansicht
Dokumentation

ABENEQUALS_STRING_EXPR - EQUALS STRING EXPR

ABENEQUALS_STRING_EXPR - EQUALS STRING EXPR

PERFORM Short Reference   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

=, String Expression

result = string_exp.

Effect

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.

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.

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.






CL_GUI_FRONTEND_SERVICES - Frontend Services   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 2934 Date: 20240426 Time: 161446     sap01-206 ( 49 ms )