‎2010 Apr 27 7:33 AM
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
‎2010 Apr 27 8:24 AM
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.
‎2010 Apr 27 7:45 AM
Then only possible option is use
LOOP.
ENDLOOP.
And Pass field by field....
Regards
sas
‎2010 Apr 27 7:46 AM
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
‎2010 Apr 27 1:54 PM
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 .
‎2010 Apr 27 3:22 PM
If both structures are different and length is different ,
then move is the only statement.
‎2010 Apr 27 7:49 AM
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
‎2010 Apr 27 8:24 AM
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.
‎2010 Apr 27 9:21 AM
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