Get Example source ABAP code based on a different SAP table
ABAP_RELEXP > - Comparison Rules for Comparison Types When operands with elementary data types are compared, the comparison is performed according to a comparison type that is determined by the involved operands, as described for elementary data objects> and calculation expressions>. The comparison type can be one of the built-in ABAP types>. When incompatible operands are compared, the operands that do not have the comparison type are converted to this type. ITOC
Numeric Comparison Type If the comparison type is one of the numeric data types>, the numeric values are compared.
Latest notes:
Since platform-dependent rounding errors may occur with data type f >, a comparison for equality often does not make any sense for binary floating point numbers.
Scale> and precision > are not relevant in comparisons between decimal floating point numbers. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 The comparison of a text string with an integer is performed with numeric comparison type i>. If the text string cannot be converted to i>, an uncatchable exception would be raised in the comparison. Convertibility is therefore checked first using the conversion operator CONV>>. ABEXA 00876 ABAP_EXAMPLE_END
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.
Latest notes:
For operands of types c> and string>, the content is not compared with the locale> of the current text environment>. The statement CONVERT TEXT>> can be used to determine the order of the locale.
For operands of type n> that contain a valid string of digits, the proportions of the numbers represented are determined correctly. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 The example shows whether the binary representation of uppercase letters is larger, the same or smaller than the binary representation of lowercase letters for individual characters. For the Unicode character representation UCS-2> used by ABAP, uppercase letters are smaller than lowercase letters. Numbers and special characters are not case-sensitive and the result of the comparison for equality is true. ABEXA 00877 ABAP_EXAMPLE_END
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.
ABAP_EXAMPLE_VX5 A byte-like comparison type is achieved by comparing byte-like operands. Invalid values are converted into hexadecimal zeros here when they are entered. ABEXA 00878 ABAP_EXAMPLE_END
Date/Time Type as Comparison Type If the comparison type is one of the date/time 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.
Latest notes: For operands of types d> and t> that contain a valid date or a valid time, the later date or time is always greater than the earlier one. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 Comparison of a date obtained by the addition of a numeric value from the current date to the original date. The later date is always greater than the earlier date. ABEXA 00879 ABAP_EXAMPLE_END
Time Stamp Type as Comparison Type If the comparison type is the time stamp type>, the times are compared, whereby a later time is always the greater value and the initial value is always less than every real time stamp.