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 ERROR :MUTUALLY COMPATIBLE

Former Member
0 Likes
1,133

H,

I have used the following structure and trying to move data.

MOVE GT_FTP_SHIP TO GT_FTP.

AND GETTING UNICODE ERROR THAT GT_FTP AND GT_FTP-SHIP ARE NOT MUTUALLY COMPATIBLE .

PLZ TELL ME OTHER THAN MOVE-CORRESPONDING WHAT WILL BE THE POSSIBLE SOLUTION .

DATA: BEGIN OF GT_FTP OCCURS 0,

BELNR(15) ,

GP01(1) TYPE X ,

BUDAT(10) ,

GP02(1) TYPE X ,

LFBNR(16) ,

GP03(1) TYPE X ,

MBUDAT(10) ,

GP04(1) TYPE X ,

EBELN(10) ,

GP05(1) TYPE X ,

WRBTR(25) ,

CARRT(2) TYPE X ,

END OF GT_FTP .

DATA: BEGIN OF GT_FTP_END OCCURS 0,

TXT(15) VALUE 'Grand Total ',

GPE01 TYPE X,

VALI1(5) VALUE SPACE,

GPE02 TYPE X,

VALI2(16) VALUE SPACE,

GPE03 TYPE X,

VALI3(10) VALUE SPACE,

GPE04 TYPE X,

VALI4(10) VALUE SPACE,

GPE05 TYPE X,

WRBTR(25) TYPE C,

CARRT(2) TYPE X ,

END OF GT_FTP_END.

DATA: BEGIN OF GT_FTP_SHIP O

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,030

Hi,

If two tables are not having same structure,then we have to move the field by field....

loop at 1st internal table and move the field by field to the second internal table.

Example:

TYPES:

begin of ty_itab1,

f1,f2,

end of ty_itab1,

begin of ty_itab2,

f1,

f2,

f3,

f4,

end of ty_itab1.

DATA:

itab1 TYPE TABLE OF ty_itab1 with header line,

itab2 TYPE TABLE OF ty_itab1 with header line.

loop at itab1.

itab2-f1 = itab1-f1.

itab2-f2 = itab2-f2.

append itab2.

clear itab2.

endloop.

Regards,

Jaya.

7 REPLIES 7
Read only

Former Member
0 Likes
1,030

Then only possible option is use

LOOP.

ENDLOOP.

And Pass field by field....

Regards

sas

Read only

Former Member
0 Likes
1,030

In unicode system move statement will work if both structures are mutually convertible i.e identical. If the structure are not identical alternative is move-corresponding and move individually in a loop.

Regards,

Chandra

Read only

0 Likes
1,030

Hi,

I m trying to copy strusture into srtructure which are not identical when compared with their fields length .Is their is any other method other than loop or move-statement .

Read only

0 Likes
1,030

If both structures are different and length is different ,

then move is the only statement.

Read only

Former Member
0 Likes
1,030

What is the problem in using move-corresponding? Also if you are in ECC6, you should replace the type x which i assume to be horizontal tab with cl_abap_char_utilities attributes.

Vikranth

Read only

Former Member
0 Likes
1,031

Hi,

If two tables are not having same structure,then we have to move the field by field....

loop at 1st internal table and move the field by field to the second internal table.

Example:

TYPES:

begin of ty_itab1,

f1,f2,

end of ty_itab1,

begin of ty_itab2,

f1,

f2,

f3,

f4,

end of ty_itab1.

DATA:

itab1 TYPE TABLE OF ty_itab1 with header line,

itab2 TYPE TABLE OF ty_itab1 with header line.

loop at itab1.

itab2-f1 = itab1-f1.

itab2-f2 = itab2-f2.

append itab2.

clear itab2.

endloop.

Regards,

Jaya.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,030

Replace the statement


MOVE GT_FTP_SHIP TO GT_FTP.

with


call method cl_abap_container_utilities=>read_container_c
exporting
im_ container = GT_FTP_SHIP
importing
ex_ value = GT_FTP
exceptions
illegal_parameter_type = 1
others = 2. 

check for reference