2006 Apr 04 5:54 PM
hello everyone,
This is what i'm doing:
*********************************************************
Open dataset....
Loop at internal table.
*Collect all data
*Concatenating all fields into string separated by comma
transfer string to string1
Endloop.
close dataset.
********************************************************
I need to add headings/titles corresponding to the fields that i'm concatenating into the string so that when i open the file on the App. Server I see the titles corresponding to the data.
How can I do that?
Thanks in advance.
Regards,
Fred.
2006 Apr 04 6:04 PM
Open dataset....
Loop at internal table.
at first.
Concatenating all headings into string separated by
comma
transfer string to string1
endat.
*Collect all data
*Concatenating all fields into string separated by comma
transfer string to string1
Endloop.
close dataset.
Open dataset....
Loop at internal table.
at first.
Concatenating all headings into string separated by
comma
transfer string to string1
endat.
*Collect all data
*Concatenating all fields into string separated by comma
transfer string to string1
Endloop.
close dataset.
2006 Apr 04 6:04 PM
Open dataset....
Loop at internal table.
at first.
Concatenating all headings into string separated by
comma
transfer string to string1
endat.
*Collect all data
*Concatenating all fields into string separated by comma
transfer string to string1
Endloop.
close dataset.
2006 Apr 04 6:06 PM
Just write to the dataset before the loop.
report zrich_0001.
parameters: d2 type localfile default '/usr/sap/TST/SYS/Data1.txt'.
data: begin of itab occurs 0,
rec(200) type c,
end of itab.
data: wa(200) type c.
start-of-selection.
* Open
open dataset d2 for output in text mode.
<b>* Write headings
wa = 'Field1,Field2,Field3,Field4,Field5'.
transfer wa to d2.</b>
* Write detail from itab
loop at itab.
transfer itab to d2.
endloop.
* Close it
close dataset d2.Regards,
Rich Heilman
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |