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

Unicode Conversion Error

Former Member
0 Likes
1,274

Hi Friends,

I have a class method where I came across the following statement


DATA nw TYPE bapi_te_network.
DATA: BEGIN OF ext,
             val1 TYPE valuepart,
             val2 TYPE valuepart,
             val3 TYPE valuepart,
             val4 TYPE valuepart,
            END OF ext.
MOVE nw TO ext.

The class has the "Unicode checks active" flag enabled.

The last "MOVE" statement works fine in a Unicode system.

However, the same statement throws an error message in a non-Unicode system - ""EXT" and "NW" are not mutually convertible. In Unicode programs, "EXT" must have the same structure layout as "NW", independent of the length of a Unicode character."

Since the Unicode checks are enabled, shouldn't the "MOVE" statement throw an error, no matter what system (Unicode/non-Unicode) it is executed on?

Regards,

Anil Madhavan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,020

Hi,

structure BAPI_TE_NETWORK contains the include structure CI_AUFK.

It may be depending on the definition of CI_AUFK (data types of the fields, ...) if there occurs a unicode error or not!

Regards,

Klaus

6 REPLIES 6
Read only

Former Member
0 Likes
1,021

Hi,

structure BAPI_TE_NETWORK contains the include structure CI_AUFK.

It may be depending on the definition of CI_AUFK (data types of the fields, ...) if there occurs a unicode error or not!

Regards,

Klaus

Read only

0 Likes
1,020

Hi Klaus,

Thanks for your quick response.

Could you please tell me, what field types would cause this error?

In the previous code snippet, the structural layouts of 'EXT' and 'NW' are different, irrespective of the definition of CI_AUFK. But still, it works in a Unicode system, but fails in a non-Unicode system. Could you please tell me why this is so?

Regards,

Anil Madhavan

Read only

0 Likes
1,020

Hi Anil,

I think all types of character fields should work fine.

CHAR and NUMC should be no problem.

Please post all fields of CI_AUFK from you non-unicode system with the unicode error, which are not of CHAR and NUMC type!

There should be the issue.

Regards,

Klaus

Read only

0 Likes
1,020

Hi Klaus,

There are 20 CURR fields of length 15, and 1 CUKY field of length 5. Could this be the reason for this error?

Additionally, the error mentions something about structure layout. Does that mean that, for an equality assignment to work (not MOVE-CORRESPONDING), both the sturctures should be exactly the same?

Regards,

Anil Madhavan

Read only

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Likes
1,020

Hi Anil,

please have a closer look at

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b02d3594-ae48-2a10-83a7-89d369b70...

Chapter 4 (and specifically 4.3).

Best regards,

Nils Buerckel

SAP AG

Read only

0 Likes
1,020

Hi Nils,

Excellent Article!!

Thank you!!

Regards,

Anil Madhavan