01-23-2009 5:50 PM
Hello Experts,
I am trying to read a survey of a service request in CRM 6.
There is not problem getting the valuexml from the correct survey but when I try to convert to string with Function Module CRM_SVY_DB_CONVERT_HEX2STRING (have also tried FM ECATT_CONV_XSTRING_TO_STRING) the returned string contains nothing more then chinese and japanese characters. If I use the xml browser in the debugger the xml is displayed correctly (I assue it converts the asian characters to xml somehow) but I cannot work with the string.
So my question is: has this happen to anyone of you? And what did you do to fix it?
The survey is made entirely in English (UK), the system language is English, can there be some translation function somewhere causing this?
I have tried it from different workstations so it is not my local settings anyway.
01-23-2009 7:08 PM
Hello,
The function module 'CRM_SVY_DB_CONVERT_HEX2STRING' does not do any code page conversion.
That is you must execute the code page conversion additionally into the system code page. For this purpose you must know in which Encoding the XSTRING is. If the XSTRING is encoded for example in UTF8, you could call the method 'XCONVCP_UTF82SYST' of the class 'CL_SURVEY_TOOLKIT' BEFORE the call of the function module 'CRM_SVY_DB_CONVERT_HEX2STRING'.
I think this should resolve the issue.
Regards,
Daniel.
01-23-2009 7:08 PM
Hello,
The function module 'CRM_SVY_DB_CONVERT_HEX2STRING' does not do any code page conversion.
That is you must execute the code page conversion additionally into the system code page. For this purpose you must know in which Encoding the XSTRING is. If the XSTRING is encoded for example in UTF8, you could call the method 'XCONVCP_UTF82SYST' of the class 'CL_SURVEY_TOOLKIT' BEFORE the call of the function module 'CRM_SVY_DB_CONVERT_HEX2STRING'.
I think this should resolve the issue.
Regards,
Daniel.
01-25-2009 11:15 PM
This problem is quite common, it implies code conversion, search the forum. Briefly, the official way to convert is to use CL_ABAP_CONV_IN_CE class. This class is supplied with documentation.
01-26-2009 9:47 AM