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: 

How to conver Hexadecimal value to Numeric number

Former Member
0 Kudos

Hi All,

I am getting the value in the format of Hexadecimal value as input and how can I change this value into Numeric Number.

Please let me know.

Regards,

Ameer Baba.

2 REPLIES 2

former_member195698
Active Contributor
0 Kudos

Hi,

You can use Field symbol with CASTING operator to convert Hexdecimal to Numeric Type (Intergers). You can try with other Numeric type also.

data:wf_int type i,

wf_hex(10) type x.

field-symbols: <fs> type any.

wf_hex = '28'.

assign wf_hex to <fs> casting type i.

wf_int = <fs>.

write wf_int.

Reward points if useful.

Regards,

Abhishek

Former Member
0 Kudos

Hi,

The source field needs to be converted into a packed number. The packed number is then converted into a numeric text field (see corresponding table in the following link).

Check this link for more details -

http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3434358411d1829f0000e829fbfe/content.htm

Hope this helps.

ashish