‎2010 Jul 07 1:05 AM
i am upgrading a old report i got a unicode error
actually the report has the followig structure
tables: arc_buffer.
DATA: BEGIN OF class_package OCCURS 0.
INCLUDE STRUCTURE arch_packa.
DATA: END OF class_package.
now the report has following syntax
APPEND arc_buffer-segment TO class_package.
when i try to execute it it gives error that
'a line of class_package and arc_buffer-segment are not mutually convertible in a unicode program.'
can any one help me to resolve this.
‎2010 Jul 07 3:40 AM
Hi Elinuk,
Use field symbols to make it compatible.
Hope the below code helps.
REPORT zvk_test.
TABLES: arc_buffer.
DATA: BEGIN OF class_package OCCURS 0.
INCLUDE STRUCTURE arch_packa.
DATA: END OF class_package.
DATA:lw_arch_packa TYPE arch_packa.
FIELD-SYMBOLS:<fs_arch_packa>.
arc_buffer-segment = 'krishna999988jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'.
ASSIGN arc_buffer-segment TO <fs_arch_packa> CASTING TYPE arch_packa.
MOVE <fs_arch_packa> TO lw_arch_packa.
APPEND lw_arch_packa TO class_package.
‎2010 Jul 07 1:08 AM
Hi,
just check data definitions in SE11. You will see that structure ARCH_PACKA does not match with ARC_BUFFER-SEGMENT. The difference is in data type as well as length.
Cheers
‎2010 Jul 07 3:40 AM
Hi Elinuk,
Use field symbols to make it compatible.
Hope the below code helps.
REPORT zvk_test.
TABLES: arc_buffer.
DATA: BEGIN OF class_package OCCURS 0.
INCLUDE STRUCTURE arch_packa.
DATA: END OF class_package.
DATA:lw_arch_packa TYPE arch_packa.
FIELD-SYMBOLS:<fs_arch_packa>.
arc_buffer-segment = 'krishna999988jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'.
ASSIGN arc_buffer-segment TO <fs_arch_packa> CASTING TYPE arch_packa.
MOVE <fs_arch_packa> TO lw_arch_packa.
APPEND lw_arch_packa TO class_package.
‎2010 Jul 07 10:15 AM
Hi mr.krishna i like to thank you very much for your support u have solved my problem i really appreciate your concern.
iam very thankful to you .
actually i am working on upgrading some old reports i am the only developer in team and i am new to upgrading .
and i like to request you if u have any interesting documents to read about unicode abap programming ..
i hope u will help me in further doubts i get .
thank you for your support......