Ansicht
Dokumentation

ABENLOGEXP_RULES_EXPR_CHAR - LOGEXP RULES EXPR CHAR

ABENLOGEXP_RULES_EXPR_CHAR - LOGEXP RULES EXPR CHAR

BAL Application Log Documentation   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

- Comparison Type of String Expressions

String expressions can be used as operands of comparison expressions with the following:

It is possible to compare a string expression with a single operand of any elementary data type or with another string expression. With regard to the conversion of the elementary expression by string, two cases can be distinguished:

  • If a string expression is compared with an individual operand in a generic logical expression, the comparison type is string. The individual operand is implicitly regarded as an embedded expression of a string template and formatted as a text string before the comparison in accordance with the associated predefined format.

Notes

  • The result of the formatting of an individual operand differs from the result of a simple conversion for some data types. An example is the type decfloat34.
  • The results of general logical expressions and logical expressions in WHERE conditions for internal tables may differ for comparisons with string expressions, since both the formatting and the comparison type play a role.

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. However, the second comparison is also true, since the numeric operand is formatted as a text string and the internal representation of the code page used is compared.

Example

This example demonstrates the effect of different formatting and different rules. All comparisons are true. An elementary operand of type decfloat34 is compared with a text string and a string expression. For the comparison with the text string, the left side is also converted to the type string and the values of both sides are the same. For the comparison with the chain, the left-hand side is formatted differently and the values of both sides are different. The third comparison shows explicitly how the elementary operand is handled during the comparison with the chain. In contrast, the WHERE conditions LOOP statements convert both sides to the numeric comparison type decfloat34. The output shows the difference between simple conversion and formatting as an embedded expression.






BAL Application Log Documentation   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 4530 Date: 20240328 Time: 102254     sap01-206 ( 67 ms )