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

Converting the data type x into type c (Unicode conversion)

Former Member
0 Likes
1,676

Hello,

We are in the process of upgrading to ECC6.0. Here I am facing the problem while converting following structure into a character or string format as type x is not allowed in Unicode programs.

DATA: BEGIN OF REPLSET,
      LINE0(16) TYPE X VALUE '000102030405060708090A0B0C0D0E0F',
      LINE1(16) TYPE X VALUE '101112131415161718191A1B1C1D1E1F',
      LINE2(03) TYPE X VALUE '222327',
      LINE7(01) TYPE X VALUE '7F',
      LINE8(13) TYPE X VALUE '8182838485868788898B8D8E8F',
      LINE9(14) TYPE X VALUE '909192939495969798999B9D9E9F',
      LINEA(12) TYPE X VALUE 'A0A4A6A7A8A9AAABACADAEAF',
      LINEB(15) TYPE X VALUE 'B0B1B2B3B4B5B6B7B8B9BABBBCBDBE',
END OF REPLSET.

Please suggest me the way how to convert the fields of above structure to type c.

Thanks,

Rakesh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
825

hi,

Check this Fm

CALL FUNCTION 'HR_RU_CONVERT_HEX_TO_STRING'
  EXPORTING
    xstring       = l_buffer
 IMPORTING
   CSTRING       = l_data

2 REPLIES 2
Read only

former_member156446
Active Contributor
0 Likes
825

Refer to this link if it might help [LINK>>>|http://www.sapfans.com/forums/viewtopic.php?p=403405&sid=e524cddae19e7ae48a12477e68c6032d]

Read only

Former Member
0 Likes
826

hi,

Check this Fm

CALL FUNCTION 'HR_RU_CONVERT_HEX_TO_STRING'
  EXPORTING
    xstring       = l_buffer
 IMPORTING
   CSTRING       = l_data