The following SQL functions can be used to pad the start and end of strings with a character template up to a specified length be filled. Most of the time this is either “0” or space.
With the function
(<Characterstring>,<Length>) numeric Strings with leading zeros up to a specified length can be filled. As soon as there is a non-numeric character in the string, this function does nothing.
The function TO_ALPHANUM is only available in HANA 2.0 and is not available in the SAP HANA Cloud. Please therefore always use ABAP_ALPHANUM .
And vice versa, you can remove a lot of characters from the beginning or end of a character string with the following functions:
LTRIM(<character string>[,<character set>])
RTRIM(<character string>[,<character set>])
TRIM( [<option>] <character set> FROM <character string>)