Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Compare char fields

$
0
0

Hi,

 

I have some doubt about how it works, the comparation between fields with the type C.

 

For example with the field type KOSTL it is a CHAR 10.

 

Data types (C, D, T, X), the comparison runs from left to right. The first character from the left that is different in each field determines which operand is greater. Text fields (type C) are compared based on the underlying character codes.

 

For the other types (C, N, X) with different lengths, the shorter operand is converted to the length of the longer before the comparison. It is then filled out as follows: Character strings (type C) are filled with spaces from the right

 

But I can't understand why this are true.

 

00383E0000 <= 0383045997 <= 0383E00196

 

 

Thank you in advance.



Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>