2016 Jul 06 5:53 AM
Hi SAP Experts,
I am working on a SAP system upgrade in which an include is have some data definitions which are no longer valid in Unicode systems.
I learned from the below link that type 'X' is no longer valid in Unicode systems.
http://help.sap.com/saphelp_nw70ehp1/helpdata/ja/79/c554d9b3dc11d5993800508b6b8b11/content.htm
Now in order to make it unicode compatible we have to replace all the declarations & command lines involving 'type x'
into respective character equivalents. This is usually done using the class 'cl_abap_char_utilities'.
But this class can be used only for a few attributes like horizontal_tab, vertical_tab,linefeed,form feed.
Hence, I need to modify some data definitions like the below but I can't find any CLASS METHOD for '81', '9F', 'E0', 'FC'.
DATA:$$sjis_1f TYPE x VALUE '81'.
DATA:$$sjis_1t TYPE x VALUE '9F'.
DATA:$$sjis_2f TYPE x VALUE 'E0'.
DATA:$$sjis_2t TYPE x VALUE 'FC'.
I tried the below two ways but they are not working:
$$sjis_1f_new = CL_ABAP_CONV_IN_CE=>UCCP( '0081' ).
CALL METHOD CL_ABAP_CONV_IN_CE=>UCCP
EXPORTING
UCCP = $$sjis_1f
RECEIVING
CHAR = $$sjis_1f_new.
Do you know which class to use for these values of hex.
<Removed by moderator>
Best Reagrds,
Lucy
Message was edited by: Matthew Billingham
2016 Jul 06 6:05 AM
Hi,
please check the methods of class CL_ABAP_CONV_OUT_CE.
Regards,
Klaus
2016 Jul 06 7:37 AM
2016 Jul 06 8:27 AM
[...] type 'X' is no longer valid in Unicode systems
Hopefully X is still fully valid. What is not valid is to mix C and X in the same ABAP statement, because a character is 2 bytes long in a Unicode system while a byte (type X) is 1 byte long (in non-Unicode systems, a character was one byte, from the compiler point of view of course).
$$sjis_1f_new = CL_ABAP_CONV_IN_CE=>UCCP( '0081' ).
This is because UCCP accepts only a type X length 2 parameter. You need to write:
DATA sjis_1f_new(1) TYPE c.
DATA uccp_dummy(2) TYPE x VALUE '0081'.
sjis_1f_new = CL_ABAP_CONV_IN_CE=>UCCP( uccp_dummy ).
or using UCCPI (decimal value instead of hexadecimal) :
sjis_1f_new = CL_ABAP_CONV_IN_CE=>UCCPI( 129 ).
2016 Jul 09 4:28 AM
Dear All,
Thanks for your replies, but unfortunately the methods suggested by you guys didn't work.
Lastly, I decided to replace all the UNICODE unsupported coding with some FMs to
achieve the include program's desired functionality.
Regards,
Lucy
2016 Jul 09 8:28 AM
So, I guess your question was misleading, because we understood that you wanted to define one character based on a "Unicode code point" (i.e. what to do to get char = U+0081).