Ansicht
Dokumentation

ABENEQUALS_OPERATOR - EQUALS OPERATOR

ABENEQUALS_OPERATOR - EQUALS OPERATOR

rdisp/max_wprun_time - Maximum work process run time   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

=, Assignment Operator

lhs = rhs.

Effect

If the character = is specified in a statement between a left side lhs (or "left hand side") and a right side rhs (or "right hand side"), it works like an assignment operator that assigns the value of the right side to the left side, using a conversion if necessary.

The right side rhs, which is the source of the assignment, is a general expression position and can be specified as follows:

  • As a return value or result of functional methods, built-in functions, or constructor expressions or table expressions

The left side lhs, the target of the assignment, is a both a declaration position and a result position and can be specified as follows:

  • As any data object that can be specified in a write position. The data type of the data object must either be compatible with the assigned value or must be convertible to the data type of lhs in accordance with one of the conversion rules. If the assigned value does not match the data type of lhs, the exceptions described in the conversion rules can occur.
  • As an inline declaration DATA(var) or FINAL(var). The data type of the declared variable is determined by the right side and is described for the different rhs options. Any variable that is used on the right side cannot be declared on the left side. An identically named data object of a more global context can be used on the right side and is not hidden by the local declaration until after the statement.

If an exception is raised on the right side, the statement is not executed, and the value of the target field is undefined.

Notes

  • If lhs is a data object, it can be prefixed with the obsolete keyword COMPUTE, which has no effect however and should therefore be omitted.
  • Another obsolete form of the assignment is the statement MOVE rhs TO lhs, where the left side is on the right side and does not include all options of the assignment operator =.

Assignments with the assignment operators = and ?= only

Assignments of a literal, a constructor expression, and an arithmetic expression to target fields.






BAL Application Log Documentation   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 4860 Date: 20240329 Time: 033353     sap01-206 ( 65 ms )