Skip to Content
0
Former Member
Jul 05, 2007 at 05:45 AM

hex to char conversion problem

15 Views

hi gurus,

please tell me what is wrong with this code.?

im getting dump whn i execute this prog.

im converting hex value to char value in unicode conversion program..

data: hex1 type x value '80'.

data: c1 type c .

CALL FUNCTION 'NLS_STRING_CONVERT_TO_SYS'

EXPORTING

lang_used = sy-langu

source = hex1

  • FROM_FE = 'MS '

IMPORTING

RESULT = c1

  • SUBSTED =

  • EXCEPTIONS

  • ILLEGAL_SYST_CODEPAGE = 1

  • NO_FE_CODEPAGE_FOUND = 2

  • COULD_NOT_CONVERT = 3

  • OTHERS = 4

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

write:/ c1.