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 assign error

Former Member
0 Likes
552

HI,

Can anybody tell me how can i assign structures with different fields in unicode enabled system.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
518

Hi Bhagyashree,

In Unicode system, you need to define the total length of the string. Simply providing the starting point doesnt work.

*       ASSIGN STXT_LOC+1 TO <B>. " In non-unicode system

        ASSIGN STXT_LOC+1(*) TO <B>. " In unicode system
        ASSIGN STXT_LOC+1(10) TO <B>. " In unicode system

Best regards,

Prashant

3 REPLIES 3
Read only

Former Member
0 Likes
519

Hi Bhagyashree,

In Unicode system, you need to define the total length of the string. Simply providing the starting point doesnt work.

*       ASSIGN STXT_LOC+1 TO <B>. " In non-unicode system

        ASSIGN STXT_LOC+1(*) TO <B>. " In unicode system
        ASSIGN STXT_LOC+1(10) TO <B>. " In unicode system

Best regards,

Prashant

Read only

Former Member
0 Likes
518

Hi,

Refer to following

Error:

ASSIGN H-TEXT+SY-INDEX TO <F1>.

SOLUTION:

ASSIGN H-TEXT+SY-INDEX(*) TO <F1>.

Reward pts if helpfull.

Regards,

Dhan

Read only

uwe_schieferstein
Active Contributor
0 Likes
518

Hello

You could use the static methods of CL_ABAP_CONTAINER_UTILITIES:

1.) READ_CONTAINER_C: read structure A into (unstructured) string Z

2.) FILL_CONTAINER_C: shuffle string Z into structure B

Result corresponds to: structure_B = structure_A (possible on non-Unicode)

Regards

Uwe