2007 Apr 29 7:27 AM
Hi all,
I want to write int table content (itab) as tab delimitated file on application server with following code. It works fine on SAP version 5 onwards but do not work in version3 on which I m working now. It gives syntax error.
Can anyone Plz tell me any replacement for this code which will work fine on version3.
open dataset d1 for output in text mode.
loop at itab.
concatenate itab-fld1 itab-fld2 into str
separated by <b>cl_abap_char_utilities=>horizontal_tab.</b>
transfer str to d1.
endloop.
close dataset d1.
cl_abap_char_utilities=>horizontal_tab ."this is stat is not identified in vers 3."
2007 Apr 29 9:45 AM
Hi,
declare char variable
data:l_space(5) type c value '#####'.
open dataset d1 for output in text mode.
loop at itab.
<b>concatenate itab-fld1 l_space itab-fld2 l_space into str.
replace all occurences of '#' in str with ' ' .</b>
transfer str to d1.
endloop.
close dataset d1.
try this one...
i hope this will be helpful to you...
reward if needful..
2007 Apr 29 7:34 AM
Declare one character variable of lenght 5 and assign 5 spaces for that.
You can use this variable for separated by option. Just try this.
2007 Apr 29 7:59 AM
2007 Apr 29 9:45 AM
Hi,
declare char variable
data:l_space(5) type c value '#####'.
open dataset d1 for output in text mode.
loop at itab.
<b>concatenate itab-fld1 l_space itab-fld2 l_space into str.
replace all occurences of '#' in str with ' ' .</b>
transfer str to d1.
endloop.
close dataset d1.
try this one...
i hope this will be helpful to you...
reward if needful..
2007 May 04 8:40 AM
Thanks for helpful answer.
But I tried it using
data :a(10) type c value 'abc'.
data : b(10) type c value 'def'.
open dataset d1 for output in text mode.
concatenate a b into a separated by '|'.
transfer a to d1.
close dataset d1.
7 it works fine.