Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Convert integer to letter ASCII

How can I turn a number into a letter?

For example if I have i = 65 that it one turns into one 'A'.

I have tried to look for something in the forum but I have not found anything that works.

Thanks!

Former Member
Former Member replied

Take a look at class CL_ABAP_CONV_IN_CE - method UCCP will take hex 0041 as input and return A as output, method UCCPI will take decimal 65 and return A. Other methods provide the functionality for more complicated scenarios.

There is also class CL_ABAP_CONV_OUT_CE - method UCCPI takes A as input and returns 65.

These are documented online under ABAP keyword documentation (the little blue i button in SE38) under ABAP - by Theme,

ABAP System Classes and Interfaces, Classes for Converting Character Sets and Number Formats.

Andrew

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question