2006 Jan 17 12:21 AM
Hi,
I have an internal table i_tab1 which contains both characters and numerics, when i use the following statement, I am getting an error saying T_TEXT and I_TAB1 are not mutually convertible in an Unicode program.
data: t_text(1000) type c.
data: begin of i_tab1 occurs 0,
field1(10) type n,
field2(10) type c,
end of i_tab1.
APPEND i_TAB1.
MOVE I_TAB1 TO T_TEXT.
TRANSFER T_TEXT TO P_FIOUT.
Does anyone know how i can solve this?
2006 Jan 17 12:49 AM
If your numeric field is of type 'N' then you don't need to move it to a seperate text string. Just download as it is. But if you just want this code to be unicode compliant, try this.
data: t_text(1000) type c.
data: begin of i_tab1 occurs 0,
field1(10) type n,
field2(10) type c,
end of i_tab1.
APPEND i_TAB1.
MOVE: I_TAB1-field1 TO T_TEXT+0(10),
I_TAB1-field2 TO T_TEXT+10(10).
TRANSFER T_TEXT TO P_FIOUT.
2006 Jan 17 12:30 AM
Hi,
Why do you need to move it to T_TEXT? I think you can directly use ..
loop at i_TAB1.
TRANSFER T_TEXT TO P_FIOUT.
endloop.
Regards,
Suresh Datti
2006 Jan 17 12:49 AM
If your numeric field is of type 'N' then you don't need to move it to a seperate text string. Just download as it is. But if you just want this code to be unicode compliant, try this.
data: t_text(1000) type c.
data: begin of i_tab1 occurs 0,
field1(10) type n,
field2(10) type c,
end of i_tab1.
APPEND i_TAB1.
MOVE: I_TAB1-field1 TO T_TEXT+0(10),
I_TAB1-field2 TO T_TEXT+10(10).
TRANSFER T_TEXT TO P_FIOUT.
2006 Jan 19 7:22 PM
Thanks Srinivas. I did try your logic and it worked.
Thanks for everyone who participated in this thread.
I did award the points and I am closing this thread.