07-05-2007 6:45 AM
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.
07-05-2007 6:50 AM
It's because there is a type conflict in the function call....
The <b>source</b> type in the FM is XSTRING, whereas the <b>hex1</b> value which you are assigning is of type X.
<b>Type Mismatch leads to Short dump.</b>
Regards,
Pavan P.
08-09-2007 3:21 AM