Skip to Content
Aug 10, 2009 at 08:52 AM



Hello all,

in my utf-16 little endian system (unicode system, 4103 system code page), I have this little program which dumps at the ASSIGN statement (exception ASSIGN_BASE_WRONG_ALIGNMENT). For information, I made sure that the program has the unicode check property active (in case there would be some bug around that).

Maybe it's a kernel problem, I use Linux x86_64.

Could you check this code, and if it works for you, could you please tell your kernel + your system code page (via SNLS transaction).

DATA x1 type x length 4.
field-symbols <c> type c.
x1 = '41004100'. "AA in utf-16 little endian
assign x1(4) to <c> casting. "<--- DUMP
write <c>.

The dump says:

In the current program, an error occurred when setting the field symbol "<C>" with ASSIGN or ASSIGNING (maybe in the combination with the CASTING addition).

When converting the base entry of the field symbol "<C>" (number in base table: 13), it was found that the target type requests a memory alignment of 2.

However, the source data object has an invalid memory alignment, that is an alignment not divisible by 2.

You may be able to avoid the error by using a different offset. The following must apply: Offset = n * 2, n >= 0

I forgot to say that I checked SAP notes and none corresponds to that issue; they only explain the general problems of alignment which is not the case here (I guess) <-- Added by: Sandra Rossi on Aug 10, 2009 11:08 AM