Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unicode Programs

Former Member
0 Kudos

Hi Friends,

I would like to know the difference between normal programming and Unicode programming.What are the options available for Unicode correction in Abap editor.small program explaining the Unicode.

Regards,

Pradeep P

2 REPLIES 2

Former Member
0 Kudos

Hi,

In the past, SAP developers used various codes to encode characters of different alphabets, for example, ASCII, EBCDI, or double-byte code pages.

Using these character sets, you can account for each language relevant to the SAP System. However, problems occur if you want to merge texts from different incompatible character sets in a central system. Equally, exchanging data between systems with incompatible character sets can result in unprecedented situations.

One solution to this problem is to use a code comprising all characters used on earth. This code is called Unicode (ISO/IEC 10646) and consists of at least 16 bit = 2 bytes, alternatively of 32 bit = 4 bytes per character. Although the conversion effort for the SAP kernel and applications is considerable, the migration to Unicode provides great benefits in the long run:

BENEFITS

1 The Internet (www) and consequently also mySAP.com are entirely based on Unicode, which thus is a basic requirement for international competitiveness. Unicode allows all SAP users to install a central system that covers all business processes worldwide.

2 Companies using different distributed systems frequently want to aggregate their worldwide corporate data. Without Unicode, they would be able to do this only to a limited degree. With Unicode, you can use multiple languages simultaneously at a single frontend computer.

3 Unicode is required for cross-application data exchange without loss of data due to incompatible character sets. One way to present documents in the World Wide Web (www) is XML, for example.

UNICODE Attribute has become a Mandatory thing in ECC6.0 to check the unicode errors related to different languages.

especially during the upgrades from lower version to ECC versions, this is important attribute as most of the things become obsolete or changed.

some unicode related errors are:

THEN...UNTIL...CORRESPONDING are obsolete

&1 must be a character type data object

In Unicode, the addition IN BYTE/CHARACTER MODE must be specified

DO...VARYING is not supported

The access and storage modes ACCESS and MODE must be specified

TRANSLATE…CODE PAGE/NUMBER FORMAT not allowed

WHILE...VARY is not supported

The data type/structure objetcs in 'ADD' statement should have same type

IN TEXT MODE the addition ENCODING must be specified

The ENCODING addition is not valid in BINARY mode

The IGNORING CONVERSION ERRORS addition is not valid in BINARY mode

The REPLACEMENT CHARACTER addition is not valid in BINARY mode

UNICODE attribute in ABAP Editor isan option set in the program to enable the code for Unicode Compatibility. So if you select this checkbox the system automatically checks for any unicode syntax errors.

For example if you are using Open dataset statement if you dont select unicode check it will not give an error for the following statement.

Open datatset for input in text mode.

Regards,

Raj.

Former Member
0 Kudos

Hi Pradeep,

In addition to Kudala's text for Unicode (UTF-8) I want to add one significant ABAP coding issue:

FIELD-SYMBOLS can still be used, but caused by the different field structure (gaps after a TYPE-change in a structure), the ASSIGN statement can not exceed the length of the field where it's assigned to (in NUS - Non-Unicode - it was possible).

Example:

DATA: field1(8) TYPE C VALUE 'abcdefgh',
           fied2(8) TYPE C VALUE '12345678',
           field3(8) TYPE C.
FIELD-SYMBOLS: <fs>.
ASSIGN field1 to <fs>.
field3 = <fs>+9(2).    "causes a compilation error; when you use variables
                           "for the position and the length then a runtime error
                           "occurs.
field3 = <fs>+6(2). "is possible because is doesn't exceed the
                            "length of field1

Have success,

Heinz