Application Development 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: 

FM - hexadecimal to String

Former Member
0 Kudos

Hi,

Is there any SAP defined Fm to convert hexadecimal value to Strting.

I tried this . It didn't work for me.

AIN_EPC_HEX_TO_CHAR

I will give max points.

10 REPLIES 10

Former Member
0 Kudos

Try HR_RU_CONVERT_HEX_TO_STRING

Regards

0 Kudos

HR_RU_CONVERT_HEX_TO_STRING is for Russian Langauge.

Former Member
0 Kudos

Hi,

Try FM STPU1_HEX_TO_CHAR. Alternatively you can try moving the hex value to a string variable.

thanks,

Senthil

0 Kudos

I tried this.

The values are same

HEX_STRING 00310031003000300030003000300030003000300030003000300034003000300000006F002000300030003000300030003000300030

Export parameters Value

CHAR_STRING 00310031003000300030003000300030003000300030003000300034003000300000006F002000300030003000300030003000300030

Former Member
0 Kudos

I tried HR_RU_CONVERT_HEX_TO_STRING - the o/p is wrong

Import parameters Value

XSTRING 0031003100300030003000300030003000300030003000300030003400300030000000

Export parameters Value

CSTRING #1#1#0#0#0#0#0#0#0#0#0#0#0#4#0#0###o# #0#0#0#0#0#0#0#0

I tried STPU1_HEX_TO_CHAR -- the o/p value is same as i/p.

Import parameters Value

HEX_STRING 00310031003000300030003000300030003000300030003000300034003000300000006F002000300030003000300030003000300030

Export parameters Value

CHAR_STRING 00310031003000300030003000300030003000300030003000300034003000300000006F002000300030003000300030003000300030

0 Kudos

Hi,

Check whether this FM Solves your purpose.

NLS_STRING_CONVERT_TO_SYS

Thanks,

Senthil

Former Member
0 Kudos

Hi,

Try with FM's

IAC_HEX_TO_CHAR

TT_IAC_HEX_TO_CHAR.

Thanks,

Sree

Former Member
0 Kudos

Hi,

U can use this class cl_abap_conv_in_ce.

Ranganathan.

Former Member
0 Kudos

None of this worked for me. Few FM I did not find it. Any one has code to covert it.

0 Kudos

To convert XSTRING to STRING I am using this one and works fine:


 DATA: xstr TYPE xstring VALUE '20', "as an example for space character
       str TYPE string.

          CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
            EXPORTING
              in_xstring = xsep
            IMPORTING
              out_string = sep.