<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Appending headers to flat file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439908#M546053</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your code !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem , the output file which got generated does not have any seperator , please  help me how to seperate the each column using a spearator in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will get a CSV file and needs to generate the new CSV file with Headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phillips&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        phillip muls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Jun 2007 08:04:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-30T08:04:47Z</dc:date>
    <item>
      <title>Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439900#M546045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have  generated a flat file with our headers to it , I have a requriement appending headers to that flat file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My idea is writing a ABAP program calling the flat file into internal table and writing the source file to other new  file with headers to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG: SRCfile (with oout headers) -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;&amp;gt;ABAP &amp;lt;-----&amp;gt; DESTfile (with Headers)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you give me a clue on the ABAP program  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate if you can share the code for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phillips&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        phillip muls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 06:06:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439900#M546045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T06:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439901#M546046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use FM : GUI_DOWNLOAD to get particular file into your internal table... then append your header in that internal table&lt;/P&gt;&lt;P&gt;then use another FM : GUI_UPLOAD .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;shardul shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 06:10:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439901#M546046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T06:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439902#M546047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might have used the loop to copy the internal table into the file.&lt;/P&gt;&lt;P&gt;You can use the code as :&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;LOOP AT itab &lt;/P&gt;&lt;P&gt;  [AT FIRST. &lt;/P&gt;&lt;P&gt;     ... &lt;/P&gt;&lt;P&gt;   ENDAT.] &lt;/P&gt;&lt;P&gt;your logic..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever the first line of internal table is in the header, you can add the header details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;P&gt;reward if useful.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 06:25:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439902#M546047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T06:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439903#M546048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi shardul shah ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using CSV file for my purpose. the FMs given by you will also work for CSV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you suggest me any changes to be made  in the FM for my purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate if you can share code for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !!&lt;/P&gt;&lt;P&gt;Phillips&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 06:28:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439903#M546048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T06:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439904#M546049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am entirely new to ABAP coding, please can you share the code for me to achieve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !!&lt;/P&gt;&lt;P&gt;Phillips&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 06:32:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439904#M546049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T06:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439905#M546050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phillip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward for useful replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZSCD_TEST7&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSCD_TEST7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB occurs 0 ,&lt;/P&gt;&lt;P&gt;        MATNR TYPE MARA-MATNR,&lt;/P&gt;&lt;P&gt;        ERNAM TYPE MARA-ERNAM,&lt;/P&gt;&lt;P&gt;        AENAM TYPE MARA-AENAM,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB1 occurs 0 ,&lt;/P&gt;&lt;P&gt;        MATNR TYPE MARA-MATNR,&lt;/P&gt;&lt;P&gt;        ERNAM TYPE MARA-ERNAM,&lt;/P&gt;&lt;P&gt;        AENAM TYPE MARA-AENAM,&lt;/P&gt;&lt;P&gt;      END OF ITAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr ernam aenam up to 10 rows from mara into table itab    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-matnr = 'Material Number'.&lt;/P&gt;&lt;P&gt;itab1-ernam = 'Created by'.&lt;/P&gt;&lt;P&gt;itab1-aenam = 'Last hanged'.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;itab1-ernam = itab-ernam.&lt;/P&gt;&lt;P&gt;itab1-aenam = itab-aenam.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : 'Hello'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                        = 'C:\Books\demo.txt' " Put your own path here.&lt;/P&gt;&lt;P&gt;   FILETYPE                        = 'ASC'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                        = itab1&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;======&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 06:52:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439905#M546050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T06:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439906#M546051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your code and it is working perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question , Already I have a  flat file without headers , how to change the logic  if want to  read data from file otherthan from tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any possibility if to read from data from flatfile to internal tables than write  to a flat file, if this is not feasible I will set with your previous code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code given by you was  really useful to me &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phillips&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 07:34:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439906#M546051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T07:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439907#M546052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Phillip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the following code now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===========&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZSCD_TEST7&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSCD_TEST7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB occurs 0 ,&lt;/P&gt;&lt;P&gt;        MATNR TYPE MARA-MATNR,&lt;/P&gt;&lt;P&gt;        ERNAM TYPE MARA-ERNAM,&lt;/P&gt;&lt;P&gt;        AENAM TYPE MARA-AENAM,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB1 occurs 0 ,&lt;/P&gt;&lt;P&gt;        MATNR TYPE MARA-MATNR,&lt;/P&gt;&lt;P&gt;        ERNAM TYPE MARA-ERNAM,&lt;/P&gt;&lt;P&gt;        AENAM TYPE MARA-AENAM,&lt;/P&gt;&lt;P&gt;      END OF ITAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****select matnr ernam aenam up to 10 rows from mara into table itab    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                      = 'C:\Books\demo1.txt'&lt;/P&gt;&lt;P&gt;    FILETYPE                      = 'ASC'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                      = itab.&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-matnr = 'Material Number'.&lt;/P&gt;&lt;P&gt;itab1-ernam = 'Created by'.&lt;/P&gt;&lt;P&gt;itab1-aenam = 'Last hanged'.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;itab1-ernam = itab-ernam.&lt;/P&gt;&lt;P&gt;itab1-aenam = itab-aenam.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : 'Hello'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                        = 'C:\Books\demo.txt'&lt;/P&gt;&lt;P&gt;   FILETYPE                        = 'ASC'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                        = itab1&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;============&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;reagrds,&lt;/P&gt;&lt;P&gt;sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 07:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439907#M546052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T07:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439908#M546053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your code !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem , the output file which got generated does not have any seperator , please  help me how to seperate the each column using a spearator in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will get a CSV file and needs to generate the new CSV file with Headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phillips&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        phillip muls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 08:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439908#M546053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T08:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Appending headers to flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439909#M546054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is no saperator, check the followingcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important :  The input file should contain the exact data.&lt;/P&gt;&lt;P&gt;Eg: If the material number is of length 18 and your file contains the material number as 21121100 - the code will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file should contain the material number as : 000000000021121100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZSCD_TEST7&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSCD_TEST7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB occurs 0 ,&lt;/P&gt;&lt;P&gt;        MATNR TYPE MARA-MATNR,&lt;/P&gt;&lt;P&gt;        ERNAM TYPE MARA-ERNAM,&lt;/P&gt;&lt;P&gt;        AENAM TYPE MARA-AENAM,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB1 occurs 0 ,&lt;/P&gt;&lt;P&gt;        MATNR TYPE MARA-MATNR,&lt;/P&gt;&lt;P&gt;        ERNAM TYPE MARA-ERNAM,&lt;/P&gt;&lt;P&gt;        AENAM TYPE MARA-AENAM,&lt;/P&gt;&lt;P&gt;      END OF ITAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****select matnr ernam aenam up to 10 rows from mara into table itab    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                      = 'C:\Books\demo1.txt'&lt;/P&gt;&lt;P&gt;    FILETYPE                      = 'ASC'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                      = itab.&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-matnr = 'Material Number'.&lt;/P&gt;&lt;P&gt;itab1-ernam = 'Created by'.&lt;/P&gt;&lt;P&gt;itab1-aenam = 'Last hanged'.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**itab1-matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;**itab1-ernam = itab-ernam.&lt;/P&gt;&lt;P&gt;**itab1-aenam = itab-aenam.&lt;/P&gt;&lt;P&gt;**append itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*split itab at '#' into itab1-matnr itab1-ernam itab1-aenam.&lt;/P&gt;&lt;P&gt;*append itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-matnr = itab+0(18).&lt;/P&gt;&lt;P&gt;itab1-ernam = itab+19(12).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;clear itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : 'Hello'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                        = 'C:\Books\demo.txt'&lt;/P&gt;&lt;P&gt;   FILETYPE                        = 'ASC'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                        = itab1&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;======&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reagrds,&lt;/P&gt;&lt;P&gt;sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 08:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-headers-to-flat-file/m-p/2439909#M546054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T08:27:47Z</dc:date>
    </item>
  </channel>
</rss>

