Application Development and Automation 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: 
Read only

Question on : Unicode Checks

Former Member
0 Likes
1,229

Hi Abapers,

If i am using 4.7 where Unicode Checks were there , how it is different from previous versions , if i am upgrading code from previous version

, what are the precautions should i need to take care , in which part of the statements should i need change ......

With Regards

Bhaskar Rao.M

1 ACCEPTED SOLUTION
Read only

christian_wohlfahrt
Active Contributor
0 Likes
1,182

Hi!

Most problems occur with move (also by perform / call function), when an un-structured variable should be equal a structured variable.


data: begin of ls_struc,
          field1(10) type c,   "has 20 bytes
          field2(10) type n,   "has 10 bytes
        end of ls_struc,
        field3(20) type c.     "has 40 bytes
move field3 to ls_struc.   "error in unicode

In a non-unicode system the move would work, because field3 has 20 bytes just as ls_struc.

Regards,

Christian

Hi Abapers,

If i am using 4.7 where Unicode Checks were there , how it is different from previous versions , if i am upgrading code from previous version

, what are the precautions should i need to take care , in which part of the statements should i need change ......

With Regards

Bhaskar Rao.M

8 REPLIES 8
Read only

christian_wohlfahrt
Active Contributor
0 Likes
1,183

Hi!

Most problems occur with move (also by perform / call function), when an un-structured variable should be equal a structured variable.


data: begin of ls_struc,
          field1(10) type c,   "has 20 bytes
          field2(10) type n,   "has 10 bytes
        end of ls_struc,
        field3(20) type c.     "has 40 bytes
move field3 to ls_struc.   "error in unicode

In a non-unicode system the move would work, because field3 has 20 bytes just as ls_struc.

Regards,

Christian

Read only

Former Member
0 Likes
1,182

Hi,

This switch to Unicode affects all statements where an explicit or implicit assumption is made about the internal length of a character. If you use these statements in a program that is designed to exploit the Unicode capabilities of the runtime environment, they must be checked and changed if necessary. Once a Unicode-enabled program has been changed accordingly, it behaves in the same way in both Unicode and non-Unicode systems. You can develop programs in a non-Unicode system (NUS) and then import them into a Unicode system (US).

Restrictions in Unicode Programs

The adjustments you have to make and the restrictions that apply in the Unicode context have been limited to the essentials on the ABAP development side to keep the conversion effort for ABAP users to a minimum. In some cases, however, this has led to the emergence of more complex rules, for example, with regard to assignments and comparisons between incompatible structures.

Character-Type and Numeric-Type Operands

Access Using Offset and Length Specifications

Assignments

Comparisons

Processing Strings

Type Checks and Type Compatibility

Changes to Database Operations

Determining the Length and Distance

Regards,

Sruthi

Read only

0 Likes
1,182

Hi,

Any bolgs available for this.

Kishi.

Read only

former_member183804
Active Contributor
0 Likes
1,182

Hallo Bhaskar,

the transaction /nABAPHELP contains in Release 7.10 an according chapter.

Regards,

Klaus

Read only

Former Member
0 Likes
1,182

hi,

many problem you will face is in OPEN dataset statements and in the SPLIT,CONCATENATE,OVERLAT,TRANSLATE, in non unicode versions these stmnt can perform operations on non character type also, but in the unicode versions these opn are possible only using character data type(c,n,d,t).

Read only

Former Member
0 Likes
1,182

IF u are using open data set for input/output/appending you must and should use encoding default other wise it will give error

Read only

Former Member
0 Likes
1,182

Hi...

In versions enabled with unicode checks, problems arise when you try to assign data to a variable which is not large enough to hold it..... Versions prior to 4.7 would not throw an error as truncation occurs... but with versions with unicode checks enabled an error is reported....

You will have to replace certain obsolete function modules like ws_upload and ws_download with suitable function modules like gui_upload and gui_download....

  • Please reward points if found useful

Read only

0 Likes
1,182

Hi,

Thanks for ur answer...

With Regards

Bhaskar Rao.M