SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Program Flow Logic → Expressions and Functions for Conditions → log_exp - Logical Expressions → rel_exp - Relational Expressions → rel_exp - Comparison Rules → rel_exp - Comparing Elementary Data Types → rel_exp - Comparisons of Calculation Expressions →rel_exp - Comparing String Expressions
String expressions can be used as operands in comparison expressions with
It is possible to compare a string expression with a single operand with any elementary data type or with another string expression.
If one of the operands in a comparison is a string expression, the comparison type is always string. If necessary, single operands are converted to the type string before the comparison.
Note
A string expression cannot be specified as the operand of a predicate expression.
Example
This example demonstrates the effect of different comparison types. The first comparison is true, since the character-like operand is converted to the type of the numeric operand (in accordance with the rule for comparing character-like data types) and the numeric value is compared. The second comparison is false, since the numeric operand is converted to the type string of the string expression and the internal representation of the code page used is compared.