05-10-2010 4:07 PM
Hi All,
I have requirement to convert numbers from Base 10 to base 36. I know sap have data type of base 16 that is hexadecimal. Please let me know any FM or method by which i can convert integer from base 10 to base 36.
Thanks,
Sarbpreet Multani
05-10-2010 4:23 PM
Hi
I haven't found any... recently I had the same issue. I used something similar to that:
WHILE v_value GT 0.
v_mod = v_value MOD v_base.
v_value = v_value DIV v_base.
* V_charset = '01234567890ABC...Z'.
concatenate v_charset+v_mod(1) po_value INTO po_value.
ENDWHILE.
v_base is 36
v_value is your input
po_output is the result in base 36
v_charset is a constant '0123456789ABC... with 36 characters
maybe you should put some validations there...
If someone knows a standard FM it will be great.
Hope it helps.
Best regards
08-26-2013 1:28 PM