2007 May 03 7:47 AM
Hi experts ,
i have these two structure in my code .plz hel me in resolving these issuses.
according to me i am gettin this error bcoz of this statement
<b>tab1 TYPE x,</b>
plz help me as it is very urgent for me
thanx in advance.
DATA:BEGIN OF it_file OCCURS 0,
rec(1200),
END OF it_file.
DATA:BEGIN OF it_proj OCCURS 0,
line_id(1) TYPE c,
tab1 TYPE x,
pspid LIKE proj-pspid,
tab2 TYPE x,
post1 LIKE proj-post1,
tab3 TYPE x,
vernr LIKE proj-vernr,
tab4 TYPE x,
astnr LIKE proj-astnr,
tab5 TYPE x,
status LIKE tj02t-istat,
tab6 TYPE x,
prctr LIKE proj-prctr,
objnr LIKE proj-objnr,
END OF it_proj.
error coming in statement:
APPEND LINES OF it_proj TO it_file.
error is :
"IT_FILE" and "IT_PROJ" are not mutually convertible. In Unicode
programs, "IT_FILE" must have the same structure layout as "IT_PROJ",independent of the length of a Unicode character.
Hi experts ,
i have these two structure in my code .plz hel me in resolving these issuses.
according to me i am gettin this error bcoz of this statement
<b>tab1 TYPE x,</b>
plz help me as it is very urgent for me
thanx in advance.
DATA:BEGIN OF it_file OCCURS 0,
rec(1200),
END OF it_file.
DATA:BEGIN OF it_proj OCCURS 0,
line_id(1) TYPE c,
tab1 TYPE x,
pspid LIKE proj-pspid,
tab2 TYPE x,
post1 LIKE proj-post1,
tab3 TYPE x,
vernr LIKE proj-vernr,
tab4 TYPE x,
astnr LIKE proj-astnr,
tab5 TYPE x,
status LIKE tj02t-istat,
tab6 TYPE x,
prctr LIKE proj-prctr,
objnr LIKE proj-objnr,
END OF it_proj.
error coming in statement:
APPEND LINES OF it_proj TO it_file.
error is :
"IT_FILE" and "IT_PROJ" are not mutually convertible. In Unicode
programs, "IT_FILE" must have the same structure layout as "IT_PROJ",independent of the length of a Unicode character.
2007 May 03 7:53 AM
2007 May 03 7:54 AM
Hi,
This is because the structures of both internal tables does not match.
U cant directly append the row of an itab to another itab which have different structures.
When u are appending the complete row of an internal table to a single field use concatenate abd append to that internal table.
Thanks & Regards
Santhosh
2007 May 03 7:58 AM
Hi,
Just try this
download ur data in it_proj into a flat file and upload it into internal table it_file.
if u have any more doubts feel free to ask.
Rgds,
Prajith
2007 May 03 8:29 AM
Hi...
create a data element with datatype RAW. say X_RAW
now..
DATA:BEGIN OF it_file OCCURS 0,
rec type X_RAW,
str(100) type C,
END OF it_file.
now move X type fields from it_proj to rec and remaining to str.
append this....
2007 May 03 11:36 AM
Hi anit ,
I hope ur doing good. Can u plz tell me in which version ur working.
Actually in ECC 6 , wht i know is we hav to stop using "occurs 0" statement and use "types" decalarations.
U can declare as Types : begin of ty_file,
.......
end of ty_file.
and
"declare work area
data : v_file type ty_file.
"declare Internal table
data : t_file type table of ty_file.
u can declare same the table "it_ proj" and see if it can help you.
hope i m able to clear ur doubt.
regards,
rajesh