‎2009 Jul 08 10:18 AM
Hi Everybody,
i user the FM 'STPU1_HEX_TO_CHAR'.
When i have the input for example 1B is the output = #. But it must be something like u2190.
What do i wrong?
I Hope anybody can help me.
Regards,
Markus
‎2009 Jul 08 10:23 AM
Hi Markus,
try this:
data: hex_numb type X,
string_numb type char100 "or string.
hex_numb = '1B'.
move hex_numb to string_numb.
or try to use FM 'CONVERSION_EXIT_ALPHA_INPUT'.
Regards
Davide
‎2009 Jul 08 10:25 AM
Hi
Check the Function Modile : AIN_EPC_HEX_TO_CHAR
Regards,
Sreeram
‎2009 Jul 08 10:28 AM
Hi,
This is because '1B' is a special character ( escape ). When you do conversion it is stored as char (internally sequence of bits is equal to that char) but it can't be output on the screen.
You can use such special character i.e. when you concatenate data to string including this char (i.e new line, tab mark, carret return etc). Then when you download these data (string) it will "do its work" in local file (i.e. will set newline, tab mark etc in particular place).
Regards
Marcin
‎2009 Jul 08 10:34 AM
Hi,
1B must be this u2190.
Have you an example coding?
The first two ideas doesn´t work.
Regards,
Markus
‎2009 Jul 08 10:40 AM
‎2009 Jul 08 1:58 PM
Thanks,
but this is not what i need. my # is not a return it is in this case a u2190.
Have anyone another idea to solve this problem.
Regards,
Markus
‎2009 Jul 08 2:12 PM
Markus,
You will not see char u2190 netiher in debugger, nor in the screen output. All special characters (including this one) will be shown as # . This is so called a replacement which system inserts when character can't be displayed. As I said above, these characters are not to be displayed . You use special characters only for special purpose i.e. placing newline, separating columns in file etc.
You will always get this #, but value really stored behind variable has correct byte format, so when you write this character to a file , then it will be applied (its purpose, not character represantion!)
Regards
Marcin
‎2010 May 03 10:45 AM
Thanks,
but this is not what i need. my # is not a return it is in this case a u2190.
Have anyone another idea to solve this problem.
Regards,
Markus
‎2009 Jul 08 2:13 PM
Hi,
You can use attributes of class cl_abap_char_utilities like,
data: v_horz_tab(1) type c,
v_cr(1) type c.
for Horizontal tab : use v_horz_tab = cl_abap_char_utilities->horizontal_tab.
for Carriage Return : use v_cr = cl_abap_char_utilities->cr_lf..
Below are the other options also to be used,
BYTE_ORDER_MARK_LITTLE
BYTE_ORDER_MARK_BIG
BYTE_ORDER_MARK_UTF8
CHARSIZE
ENDIAN
MINCHAR
MAXCHAR
HORIZONTAL_TAB
VERTICAL_TAB
NEWLINE
CR_LF
FORM_FEED
BACKSPACE
SPACE_STR
SPACE_STR_LANGU
Hope it helps
Regards
Mansi