‎2007 Jan 09 2:03 PM
when trying to write data to a file, I get this message:
<b>error message:</b>
"H_LINEBUFFER" and "I_YLSRCORD" are not mutually convertible in a Unicode program.
<b>my declaration:</b>
DATA: h_linebuffer TYPE string.
DATA: i_ylsrcord LIKE /bic/aylsrcord00 OCCURS 0 WITH HEADER LINE.
<b>place where I get the error:</b>
loop at i_ylsrcord.
move i_ylsrcord to h_linebuffer.
TRANSFER h_linebuffer to h_file.
endloop.
‎2007 Jan 09 2:18 PM
‎2007 Jan 09 2:17 PM
<b>DATA: i_ylsrcord LIKE /bic/aylsrcord00 OCCURS 0 WITH HEADER LINE.</b>
It's declared as an Internal Table while
<b>DATA: h_linebuffer TYPE string.</b>
It's declared as a field....That's why you can't assign i_ylsrcord to h_linebuffer. You can pass fields not tables to a field type....
Greetings,
Blag.
‎2007 Jan 09 2:18 PM
‎2007 Jan 09 2:28 PM
you were right Rich, I don't even need the string
thanks a lot !
topic can be closed!
‎2007 Jan 09 2:20 PM
hi Joris,
loop at i_ylsrcord.
move i_ylsrcord to h_linebuffer. ---><b> You are trying to pass an internal table to a string </b>
TRANSFER h_linebuffer to h_file.
endloop.
‎2007 Jan 09 2:21 PM
‎2007 Jan 09 2:26 PM
> <i>move i_ylsrcord to h_linebuffer. <b>---> You are
> trying to pass an internal table to a string</b></i>
>
>
> No, he is not, he is passing the header line to the
> string.
>
> Regards,
> Rich Heilman
-:( Your right....I didn't notice it -:)
Greetings,
Blag.
‎2007 Jan 09 2:21 PM
Hi Joris,
Try declaring h_linebuffer as below.
data: h_linebuffer(132).
Hope it helps..
Regards
Sekar