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

conversion of binary string into headecimal

Former Member
0 Likes
964

Ho will i convert binary string into hexadecimal fromat

5 REPLIES 5
Read only

Former Member
0 Likes
838

Hi

Check the fun module

CHAR_HEX_CONVERSION

Regards

Anji

Read only

Former Member
0 Likes
838

It not working my input is 1111 but its not giving 'F' as output

Read only

Former Member
0 Likes
838

hi

good

CONVERT_FROM_CHAR_SORT_RFW - it will Convert from character to any datatype.

thanks

mrutyun^

Read only

Former Member
0 Likes
838

HI,

Thanks but the above module is not present my system.

I have number which needs to be converted into binary first and then into Hex.

I have written it code for conversion of decimal number into Binary.But i am not able to convert it into Hex.

My rough code is ....

types : begin of t_temp,

r1 type i,

end of t_temp.

data : ty_temp type standard table of t_temp ,

wa_temp type t_temp.

DATA : num TYPE i,

temp1 TYPE string,

temp2 TYPE string,

temp3 TYPE string,

temp4 TYPE x.

******************************

temp1 = 0.

temp2 = ''.

num = 64.

****************************************

while num ne 1.

temp1 = num MOD 2.

num = num / 2.

If temp1 = 1.

num = num - 1.

endif.

concatenate temp1 temp2 into temp2 .

endwhile.

temp1 = 1.

concatenate temp1 temp2 into temp2 .

condense temp2 no-gaps .

WRITE : temp2 .

Read only

Former Member
0 Likes
838

Plz if any of u can help me than i will be i highly oblidged...