01-15-2008 4:23 PM
Hello,
Does anyone know whether these is a function module to convert between decimal and ascii representations of characters?
For example, the letter 'A' is '65' in decimal representation.
What I want to ba able to do is convert the '65' back to an 'A' within my code.
Thanks,
Ruby
01-15-2008 4:33 PM
report zars no standard page heading
line-size 170
line-count 65(4).
data: content type string ,
xcontent type xstring.
xcontent = '61'.
data: conv type ref to cl_abap_conv_in_ce.
conv = cl_abap_conv_in_ce=>create( input = xcontent ).
conv->read( importing data = content ).
Here content contains the value "a"
01-16-2008 10:05 AM
Hello,
Thank-you for your answer. It did answer my question but I have been looking into this a little more and have a further question for you.
I have just been looking at the ASCII Character set and it shows 'A' = 65 (rather than 61) and it is this conversion that I am really looking for.
I guess the method you have given me does some kind of conversion between hexadecimal representation and alphanumeric representation but what I am looking for I think is a conversion between decimal representation and alphanumeric notation.
Is there another method which provides this?
I have looked at the other methods on class cl_abap_conv_in_ce but I don't think any of them do what I need to do.
If you have any suggestions, please let me know.
Thanks,
Ruby