Ansicht
Dokumentation

ABENLOGEXP_BYTE - LOGEXP BYTE

ABENLOGEXP_BYTE - LOGEXP BYTE

BAL Application Log Documentation   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- Comparison Type of Byte-Like Data Objects

The following tables show the comparison types for comparisons between byte-like data types and other data types. If the type of an operand is not the same as the comparison type, it is converted to this type. The comparison rules for the comparison types determine how the comparison is performed.

Comparisons with Numeric Data Types

- xstring, x
decfloat16, decfloat34 decfloat34
f f
p p
int8 int8
i, s, b i

Note

In conversions of byte-like data types to any numeric type except int8, only the last four bytes are respected. In the case of int8, the last 8 bytes are respected.

Example

Since the decimal places are lost in the conversion between numeric and byte-like types, the comparison for inequality is true.

Comparisons with Character-Like Data Types

- xstring x
string string string
c string c
n p p

Length adjustments

  • When data type c is compared with x or xstring, the shorter field is adjusted to the length of the longer field after conversions from x to c or xstring to string. Blanks are used as filler on the right.
  • Lengths are not adjusted for comparisons between the data type string and x or xstring.

Example

The comparison uses the appropriate conversion rules to convert the hexadecimal content "FF00" of hex to the string "FF00", which is then compared with "FFxx". The operands are not equal.

Comparisons with Byte-Like Data Types

- xstring x
xstring xstring xstring
x xstring x

Length Adjustments

  • Operands of the data type xstring with different lengths never match. If the content of the operands matches the length of the shorter operand, the shorter operand is smaller than the longer one. Otherwise the surplus bytes in the longer field are truncated on the right, and then the content is compared.
  • In comparisons between two operands of the data type x, the shorter field is converted to the longer field, with hexadecimal 0 used as padding on the right.

Example

Before the comparison, the appropriate conversion rules are used to convert the content of "FFxx" from text to the hexadecimal value "FF00" in the helper variable hex_helper, and this value is compared with the content of hex.

Comparisons with Date Types, Time Types, or Time Stamp Types

- xstring, x
d, t i
utclong -

Example

A hexadecimal number that is the result of the conversion of a valid date is equal to this date.






BAL_S_LOG - Application Log: Log header data   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 5841 Date: 20240416 Time: 084502     sap01-206 ( 73 ms )