Use the char_length string function and datalength system function to determine column length.
char_length returns the number of characters in the column, stripping trailing blanks for variable-length datatypes.
datalength returns the number of bytes, stripping trailing blanks for data stored in variable-length columns.
When a char value is declared to allow NULL values, the SAP ASE server stores it internally as a varchar.
If the min or max aggregate functions are used on a char column, the result returned is varchar, and is therefore stripped of all trailing spaces.