sapdev logo background
sapdev logo sapdev logo
Comments

SAP COMPARISON TYPE documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

rel_exp - Comparison Type
When operands with elementary data types are compared, the comparison uses a comparison type defined by the operands in question. The comparison type be one of the
predefined ABAP types . When incompatible operands are compared, the operands that do not have the comparison type are converted to this type.

Numeric Comparison Type
If the comparison type is one of the
numeric data types , the numeric values are compared.

Notes
  • Platform-dependent rounding errors may occur with data type f , which means it often does not make sense to compare floating point numbers to see if they match.

  • Scale and precision

  • are not relevant in comparisons between decimal floating point numbers.

    Character-Like Comparison Type
    If the comparison type is one of the
    character-like data types , the content is compared from left to right. Based on the internal binary representation in the code page used, the first differing character from the left determines which operand is greater.

    Notes
  • For operands of types c and string , the contents are not compared on the basis of the locale of the current text environment . To specify the order with reference to the locale , the statement CONVERT TEXT can be used.

  • If operands of type n contain a valid string of digits, the proportions of the numbers represented are determined correctly.

  • For operands of types d and t containing a valid date or a valid time, the later date or time is always greater than the earlier one.


  • Byte-Like Comparison Type
    If the comparison type is one of the
    byte-like data types , the content is compared from left to right. Based on the byte values, the first differing byte from the left determines which operand is greater.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    COMPARISON_RULE_GLOSRY
    COMPARISON_TYPE_GLOSRY




    comments powered by Disqus