To do a alpha conversion directly in AMDP script the following expression can be used:
SELECT ..., CASE WHEN ( LENGTH(LTRIM(hanaview."CHARACTERISTIC",' 0123456789')) = 0 and LTRIM(hanaview."CHARACTERISTIC",' ') <> '' )
THEN LPAD( hanaview."CHARACTERISTIC",5,'0' ) ELSE hanaview."CHARACTERISTIC" END as "/BIC/CHARACTERISTIC", ... FROM ...
This statement checks if the string is not empty and only numeric. If so, it fills up to in this example a length of 5 characters with 0.
Related:
https://answers.sap.com/questions/553951/sap-hana-sql-script-alpha-conversion.html