‎2010 Apr 12 12:29 PM
What is the programming(ABAP) difference between Unicode and non Unicode?
Edited by: NIV on Apr 12, 2010 1:29 PM
‎2010 Apr 12 12:51 PM
There are a good number of programming differences as ur unicode system gets more and more language + code page dependant.
1. For one, usage 'TYPE X' for declaration of Hex Variables is not permitted. Instead make use of class-method CLASS_CHAR_UTILITIES or CLASS_ABAB_CONV_IN_CE as best fitted.
2. If using 'TRANSLATE <string> TO UPPER/LOWER CASE' stmt, then setting the locale is necessary.
3. For reading/writing files from/to application server, an addition of MODE and Default is a must.
4. The upload/download can no longer be used, for one as they have grown obselete and replaced by GUI_DOWNLOAD/UPLOAD.
5. Can no longer have variable names containing a hyphen '-'.
These were some of the checks we kept in mind when upgarding to ECC 6.0 aka unicode system.
-- Dedeepya C
‎2010 Apr 12 1:02 PM
hi
unicode is the universal character encoding which is maintained by unicode consortium.unicode converts all the writing symbols present whether it is technical symbol , punctuation or any other special char.it supports all the languages also some systems like XI can work in unicode .also unicode system require around 70% more storage area and processing speed.you have to check the unicode flag while creating the program , if that flag is unchecked then program will be executed only in non unicode systems
thanks
tanmaya
‎2010 Apr 12 1:19 PM
Hi,
Please fing below the difference:
Unicode provides a unique number for every character, independent of all programs or platforms.
Upto release 4.7, non unicode kernal was supported and after that in netWeaver and ECC 5.0 etc. unicode kernel is supported.
Unicode is mandatory for SAP systems to deploy JAVA applications.
Unicode supports all different languages like Englich, Chinese, Germal, etc whereas non unicode supports only english and german.
Thanks & Regards
Rocky
‎2010 Apr 12 2:14 PM
Hi
The difference between programming in Unicode or not Unicode is that you should consider some adjustments to make on the Program "Z" to comply with the judgments Unicode Standard.
In the past, developments in SAP using multiple systems to encode the characters of different alphabets. For example: ASCII, EBCDI, or double-byte code pages.
These coding systems mostly use 1 byte per character, which can encode up to 256 characters. However, other alphabets such as Japanese or Chinese use a larger number of characters in their alphabets. That's why the system using double-byte code page, which uses 2 bytes per character.
In order to unify the different alphabets, it was decided to implement a single coding system that uses 2 bytes per character regardless of what language is concerned. That system is called Unicode.
Unicode is also the official way to implement ISO/IEC 10646 and is supported in many operating systems and all modern browsers.
The way of verifying whether a program was adjusted or not, is through the execution of the UCCHECK transaction. Additionally, you can check by controlling syntax (making sure that this asset verification check Unicode).
The main decisions to adjust / replace are (examples):
ASSIGN H-SY-INDEX TEXT TO ASSIGN <F1> by
H-SY-INDEX TEXT (*) TO <F1>.
DATA INIT (50) VALUE '/'. by
DATA INIT (1) VALUE '/'.
DESCRIBE FIELD text LENGTH lengh2 by
DESCRIBE FIELD text LENGTH lengh2 in character mode.
T_ZSMY_DEMREG_V1 = record_tab by
record_tab TO MOVE-Corresponding t_zsmy_demreg_v1.
escape_trick = hot3. by
escape_trick-x1 = hot3.
itab_txt TYPE wt by
ITAB_TXT TYPE TABLE OF TEXTPOOL
DATA: string3 (3) TYPE X VALUE B2023 '3 'by
DATA: string3 (6) B2023 TYPE c VALUE '3 '.
OPEN DATASET file_name IN TEXT MODE by
OPEN DATASET file_name FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
or
OPEN DATASET file_name FOR INPUT IN TEXT MODE ENCODING DEFAULT.
CODE FROM PAGE TRANSLATE a_codepage record by
record TRANSLATE USING a_codepage.
CALL FUNCTION 'DOWNLOAD' by
CALL METHOD cl_gui_frontend_services => gui_download
CALL FUNCTION 'WS_DOWNLOAD' by
CALL METHOD cl_gui_frontend_services => gui_download
CALL FUNCTION 'UPLOAD' by
CALL METHOD cl_gui_frontend_services => gui_upload
CALL FUNCTION 'WS_UPLOAD' by
CALL METHOD cl_gui_frontend_services => gui_upload
PERFORM USING HEAD APPEND_XFEBRE +2. by
PERFORM USING HEAD APPEND_XFEBRE +2 (98).
Best Regars
Fabio Rodriguez
‎2010 Apr 12 2:15 PM