<?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 Flat File in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982624#M704182</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 ur flate file is on presentation server then use fm GUI_DOWNLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Call function to download the error file&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 = file&lt;/P&gt;&lt;P&gt;filetype = 'ASC'&lt;/P&gt;&lt;P&gt;APPEND = 'X'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = pr_eord_error&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;file_write_error = 1&lt;/P&gt;&lt;P&gt;no_authority = 5&lt;/P&gt;&lt;P&gt;unknown_error = 6&lt;/P&gt;&lt;P&gt;access_denied = 15&lt;/P&gt;&lt;P&gt;file_not_found = 19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if its on application server then use open dataset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex. *-- Open Dataset&lt;/P&gt;&lt;P&gt;OPEN DATASET lv_dsn FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&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;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Nov 2007 11:30:44 GMT</pubDate>
    <dc:creator>former_member386202</dc:creator>
    <dc:date>2007-11-14T11:30:44Z</dc:date>
    <item>
      <title>Appending Flat File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982622#M704180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a requirement of appending new records in a flat file every time when i am executing a transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a flat file ( DAT type ). When I am executing a transaction code some new records will be generated and these records should be appended to the existing flat file with out deleting the existing records in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;What function module I have to use and how to use that?&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Helpful answers will be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 11:08:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982622#M704180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T11:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Flat File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982623#M704181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends on where your file is being stored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your file is stored on the application server, the you do not need a function module, you should use the open dataset command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to add "for appending" to your open dataset statement.  Check the F1 help on the open dataset command in your program for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;open dataset &amp;lt;filename&amp;gt; for appending.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are storing the file on your local PC, then one way to do it is to first upload the file using Function Module GUI_UPLOAD, add your records, then download it back to the desktop using GUI_DOWNLOAD.  I am not aware of any method to add records directly to a file on the desktop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris H.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 11:28:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982623#M704181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T11:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Flat File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982624#M704182</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 ur flate file is on presentation server then use fm GUI_DOWNLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Call function to download the error file&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 = file&lt;/P&gt;&lt;P&gt;filetype = 'ASC'&lt;/P&gt;&lt;P&gt;APPEND = 'X'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = pr_eord_error&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;file_write_error = 1&lt;/P&gt;&lt;P&gt;no_authority = 5&lt;/P&gt;&lt;P&gt;unknown_error = 6&lt;/P&gt;&lt;P&gt;access_denied = 15&lt;/P&gt;&lt;P&gt;file_not_found = 19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if its on application server then use open dataset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex. *-- Open Dataset&lt;/P&gt;&lt;P&gt;OPEN DATASET lv_dsn FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&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;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 11:30:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982624#M704182</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-11-14T11:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Flat File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982625#M704183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are two cases&lt;/P&gt;&lt;P&gt;Case 1. If u want to download into Local Pc&lt;/P&gt;&lt;P&gt;            then u have to use GUI_Download  ---&amp;gt; &lt;/P&gt;&lt;P&gt;             exporting ---&amp;gt;  append = 'X'.&lt;/P&gt;&lt;P&gt;case 2 : If u want to download into App server&lt;/P&gt;&lt;P&gt;               then u can use &lt;/P&gt;&lt;P&gt;                open data set for append mode&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 11:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982625#M704183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T11:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Appending Flat File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982626#M704184</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;Please close one of your duplicate threads - &lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="633570"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 11:36:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-flat-file/m-p/2982626#M704184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T11:36:19Z</dc:date>
    </item>
  </channel>
</rss>

