Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hex value needs to be removed - Unicode system

former_member194669
Active Contributor
0 Likes
974

One of the text field contains a hex character as '0A' i need to remove. I tried to move text field to hex field. remove the hex value then put it back into the same text field, but this is not working.

Due to system is a UNICODE enabled with codepage SEARCH and REPLACE not working

Any Info ?

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
767

I am not sure but FM PREPARE_STRING?

[bad hex character|http://www.sapfans.com/forums/viewtopic.php?p=91589&sid=c7ef36fec60a616f1194b6fdac217d4b]

One of the text field contains a hex character as '0A' i need to remove. I tried to move text field to hex field. remove the hex value then put it back into the same text field, but this is not working.

Due to system is a UNICODE enabled with codepage SEARCH and REPLACE not working

Any Info ?

4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
768

I am not sure but FM PREPARE_STRING?

[bad hex character|http://www.sapfans.com/forums/viewtopic.php?p=91589&sid=c7ef36fec60a616f1194b6fdac217d4b]

Read only

0 Likes
767

J@Y,

The link u provided. have same issue of mine. and its worked.

Read only

Former Member
0 Likes
767

Hi,

Try like below:



data: l_len type i,
      v_len type i,
      l_syb type x value ''0A'. 
 

 
field-symbols <fs> type any.
 
v_len = strlen( string ).   "string is variable where you want to replace
 
while l_len lt v_len.
  assign string+l_len(1) to <fs> casting type x.
  if <fs> eq l_syb.
    string+off(1) = ' '.
  endif.
  add 1 to l_len.
endwhile.

Regards,

Himanshu

Read only

0 Likes
767

Type casting with X will not work in UTF-16

getting error "the length of "X" in bytes must be a multiple of the size of a Unicode character"

Thanks for time & reply