Application Development 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: 

Creating a Unix File

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

3 REPLIES 3

suresh_datti
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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.