Showing results for 
Search instead for 
Did you mean: 

UNICODE Enabled ABAP Programs

0 Kudos

This Discussion about unicode changes in exsiting ABAP programs that are not unicode enabled .

You can share your knowledge here with us .

Accepted Solutions (0)

Answers (3)

Answers (3)

Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi all,

the following list summarizes the stricter syntax in Unicode enabled programs:

Offset/length accesses: Only performed on character-type or byte-type ranges, and only on flat character-type initial parts of structures

Memory accesses: No access to memory outside a data object

Separation of byte string and character string processing: Explicit specification with IN BYTE MODE or IN CHARACTER MODE ; appropriate types expected ? for character strings this means only  c, d, n, t, string, and flat structures with purely character-type components

Structures: When assigning and comparing you must take the Unicode fragment view into consideration

File interface: Implicitly opening files not permitted; access, storage, and coding type must be specified explicitly; no write access to read-only files

Conversions:  TRANSLATE ... CODE PAGE ..., TRANSLATE ... NUMBER FORMAT ... not permitted

OPEN SQL: Stricter conditions for work areas

Type assignment using STRUCTURE: Stricter checks on assignments to field symbols and formal parameters typed using STRUCTURE

Function module calls: A specified formal parameter of a function module must be available


Horst Keller

Former Member
0 Kudos

Where I can find more details about the messages and Error code I get from the UCCHECK transaction

e.g Error code MESSAGEGM0

and the message "Sequential read access to a Standard table"

Developer Advocate
Developer Advocate
0 Kudos

The main place where I have had to change code to get it to compile with Unicode Checks on is in the area of the ABAP File Interface.  The on-line help gives an excellent break down of the changes made to the File Interface. The following is an example of a Open File command. The commented code was the 46C version. The new code is for 620. Please note that the changes to the code also show the switch to the new catchable exceptions in 620 as well.

        • Open the Input file

*{   REPLACE S11K900028 1

*\u00A0 open dataset filename1 for input in text mode message message_text.

data: text type string.


  open dataset filename1 for input in text mode

       encoding default

       message message_text.


        • Test that the open was successful

*{   REPLACE S11K900028 2

*\u00A0 if sy-subrc = 8.

*\u00A0   message x013 with filename1 message_text.

*\u00A0 endif.

catch cx_sy_file_open into o_sy_file_open.

      text = o_sy_file_open->get_text( ).

      message text type 'X'.

catch cx_sy_codepage_converter_init  into o_sy_codepage_converter_init.

      text = o_sy_codepage_converter_init->get_text( ).

      message text type 'X'.

catch cx_sy_conversion_codepage  into o_sy_conversion_codepage.

      text = o_sy_conversion_codepage->get_text( ).

      message text type 'X'.

catch cx_sy_file_authority into o_sy_file_authority.

      text = o_sy_file_authority->get_text( ).

      message text type 'X'.

catch cx_sy_pipes_not_supported into o_sy_pipes_not_supported.

      text = o_sy_pipes_not_supported->get_text( ).

      message text type 'X'.

catch cx_sy_too_many_files into o_sy_too_many_files.

      text = o_sy_too_many_files->get_text( ).

      message text type 'X'.