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

problem with 'append' syntax in ECC 6.0

Former Member
0 Likes
731

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.

1 ACCEPTED SOLUTION
Read only

vattekrishna
Participant
0 Likes
685

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.

3 REPLIES 3
Read only

mvoros
Active Contributor
0 Likes
685

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

Read only

vattekrishna
Participant
0 Likes
686

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.

Read only

0 Likes
685

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......