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 upgrade

Former Member
0 Likes
733

Hi all

While doing unicode upgrade, what things we have to take care in case of field symbol assignments.

Please get back asap..

Regards

Dinesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
707

HI

I have worked a bit on unicode upgrade. I can help you with 2-3 points.

Ranges for offset-based and length-based access when using field symbols

A Unicode Program(UP) ensures that offset-based or length-based access with ASSIGN is only permitted within a predefined range. Normally, this range corresponds to the field boundaries in case of elementary fields or, in case of flat structures, to the purely character-type initial part. Using a special RANGE addition for ASSIGN, you can expand the range beyond these boundaries.

Field symbols are assigned a range allowed for offset/length specifications.

Also check with the following code snippets:

data: begin of STRUC,

F1(3) type x,

F2 type p, F3(10) type c

end of STRUC,

CONTAINER(1000) type c.

  • Store data in container

CONTAINER = STRUC. " Unicode error * Read data from container

STRUC = CONTAINER. " Unicode error

After the conversion to Unicode

field-symbols: <C_STRUC> type c.

assign STRUC to <C_STRUC> casting.

  • Store data in container

CONTAINER = <C_STRUC>." ok

  • Read data from container

<C_STRUC> = CONTAINER. " ok

Regards

Manish

5 REPLIES 5
Read only

Former Member
0 Likes
707

Hi Dinesh,

If you are assigning fields using MOVE CORRESPONDING you may need to MOVE individual fields.

Regards,

Atish

Read only

rainer_hbenthal
Active Contributor
0 Likes
707

Check if the using of the field symbol is kind of dirty casting. You can enable those statements for unicode by adding the casting tag, but you have to check if the result is still correct. his test cant be done in a unicode system, you have to check those statements in a unicode system! We hat do change some of those dirty castings (which will work if 1 char is one byte but not on unicode) by moving the components one by the other.

Read only

Former Member
0 Likes
707

Did Not get what i was expecting. Please elaborate with some code .

Regards

Dinesh

Read only

Former Member
0 Likes
708

HI

I have worked a bit on unicode upgrade. I can help you with 2-3 points.

Ranges for offset-based and length-based access when using field symbols

A Unicode Program(UP) ensures that offset-based or length-based access with ASSIGN is only permitted within a predefined range. Normally, this range corresponds to the field boundaries in case of elementary fields or, in case of flat structures, to the purely character-type initial part. Using a special RANGE addition for ASSIGN, you can expand the range beyond these boundaries.

Field symbols are assigned a range allowed for offset/length specifications.

Also check with the following code snippets:

data: begin of STRUC,

F1(3) type x,

F2 type p, F3(10) type c

end of STRUC,

CONTAINER(1000) type c.

  • Store data in container

CONTAINER = STRUC. " Unicode error * Read data from container

STRUC = CONTAINER. " Unicode error

After the conversion to Unicode

field-symbols: <C_STRUC> type c.

assign STRUC to <C_STRUC> casting.

  • Store data in container

CONTAINER = <C_STRUC>." ok

  • Read data from container

<C_STRUC> = CONTAINER. " ok

Regards

Manish

Read only

Former Member
0 Likes
707

Query solved. Points rewarded. Thanks.

Sorry for the mess-up. I awarded points to the wrong person. Anyways thanks to all.