2008 May 19 5:35 PM
Hello guys , I want to insert in the forst line of my internal table son titles in order to move the entire table to txt file , But I dont kno how I can put the titles in the first line, any suggestion ? DO I have to use a index?
2008 May 19 5:38 PM
Yes, you need to use an index
Here are the variants for insert
1. INSERT [wa INTO|INITIAL LINE INTO] itab [INDEX idx].
2. INSERT [wa INTO|INITIAL LINE INTO] TABLE itab.
3. INSERT LINES OF itab1 [FROM idx1] [TO idx2]
INTO itab2 [INDEX idx3].
4. INSERT LINES OF itab1 [FROM idx1] [TO idx2]
INTO TABLE itab2.
Hello guys , I want to insert in the forst line of my internal table son titles in order to move the entire table to txt file , But I dont kno how I can put the titles in the first line, any suggestion ? DO I have to use a index?
2008 May 19 5:38 PM
Yes, you need to use an index
Here are the variants for insert
1. INSERT [wa INTO|INITIAL LINE INTO] itab [INDEX idx].
2. INSERT [wa INTO|INITIAL LINE INTO] TABLE itab.
3. INSERT LINES OF itab1 [FROM idx1] [TO idx2]
INTO itab2 [INDEX idx3].
4. INSERT LINES OF itab1 [FROM idx1] [TO idx2]
INTO TABLE itab2.
2008 May 19 5:38 PM
Where are you writing the text file??
If you are using GUI_download, then you can pass the header text( in a different internal table) to the FM.
If you are using open dataset you can write the header first and then the internal table.
I dont think inserting text in the data table is a good idea.
2008 May 19 5:39 PM
First create an internal table with header line only and in the second u keep all data.After that use FM GUI_Download and mark Append = 'X' in the FM.Thats it,u will get the desired output.
Reward If found helpful.