‎2007 Oct 17 8:00 AM
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
‎2007 Oct 17 11:57 AM
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
‎2007 Oct 17 8:03 AM
Hi Dinesh,
If you are assigning fields using MOVE CORRESPONDING you may need to MOVE individual fields.
Regards,
Atish
‎2007 Oct 17 8:21 AM
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.
‎2007 Oct 17 11:50 AM
Did Not get what i was expecting. Please elaborate with some code .
Regards
Dinesh
‎2007 Oct 17 11:57 AM
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
‎2007 Oct 17 12:00 PM
Query solved. Points rewarded. Thanks.
Sorry for the mess-up. I awarded points to the wrong person. Anyways thanks to all.