<?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 Open Dataset - Edit Line in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-edit-line/m-p/12326097#M1991368</link>
    <description>&lt;P&gt;Hey, &lt;/P&gt;
  &lt;P&gt;i have a Question of using OPEN DATASET .&lt;/P&gt;
  &lt;P&gt;I just want to append a special Test to a line in an already existing '.TXT' file. &lt;/P&gt;
  &lt;P&gt;TXT File Example.&lt;/P&gt;
  &lt;P&gt;Line 1: ABC&lt;/P&gt;
  &lt;P&gt;Line 2: DEF&lt;/P&gt;
  &lt;P&gt;Line 3: JKL&lt;/P&gt;
  &lt;P&gt;Now i want to append 'GHI' to Line 2.&lt;/P&gt;
  &lt;P&gt; I just tried to read the line, concatenated 'GHI' and TRANSFER it again, but the following line got overwritten by this. &lt;/P&gt;
  &lt;P&gt;So there ist only &lt;/P&gt;
  &lt;P&gt;Line 1: ABC&lt;/P&gt;
  &lt;P&gt;Line 2: DEFGHI &lt;/P&gt;
  &lt;P&gt;left. Can you help me how to insert Text into special lines without overwriting the following?&lt;/P&gt;
  &lt;P&gt;Best regards&lt;/P&gt;</description>
    <pubDate>Wed, 17 Feb 2021 12:02:53 GMT</pubDate>
    <dc:creator>former_member729792</dc:creator>
    <dc:date>2021-02-17T12:02:53Z</dc:date>
    <item>
      <title>Open Dataset - Edit Line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-edit-line/m-p/12326097#M1991368</link>
      <description>&lt;P&gt;Hey, &lt;/P&gt;
  &lt;P&gt;i have a Question of using OPEN DATASET .&lt;/P&gt;
  &lt;P&gt;I just want to append a special Test to a line in an already existing '.TXT' file. &lt;/P&gt;
  &lt;P&gt;TXT File Example.&lt;/P&gt;
  &lt;P&gt;Line 1: ABC&lt;/P&gt;
  &lt;P&gt;Line 2: DEF&lt;/P&gt;
  &lt;P&gt;Line 3: JKL&lt;/P&gt;
  &lt;P&gt;Now i want to append 'GHI' to Line 2.&lt;/P&gt;
  &lt;P&gt; I just tried to read the line, concatenated 'GHI' and TRANSFER it again, but the following line got overwritten by this. &lt;/P&gt;
  &lt;P&gt;So there ist only &lt;/P&gt;
  &lt;P&gt;Line 1: ABC&lt;/P&gt;
  &lt;P&gt;Line 2: DEFGHI &lt;/P&gt;
  &lt;P&gt;left. Can you help me how to insert Text into special lines without overwriting the following?&lt;/P&gt;
  &lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 12:02:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-edit-line/m-p/12326097#M1991368</guid>
      <dc:creator>former_member729792</dc:creator>
      <dc:date>2021-02-17T12:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset - Edit Line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-edit-line/m-p/12326098#M1991369</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you share the code you're using to append data to the file?&lt;/P&gt;&lt;P&gt;I guess you should first read the full file into e.g. an internal table, modify your internal table as desired and then write the file to the application server again based on the contents of your internal table.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Geert-Jan Klaps&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 13:49:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-edit-line/m-p/12326098#M1991369</guid>
      <dc:creator>geert-janklaps</dc:creator>
      <dc:date>2021-02-17T13:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset - Edit Line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-edit-line/m-p/12326099#M1991370</link>
      <description>&lt;P&gt;The file opened by OPEN DATASET is a &lt;A href="https://en.wikipedia.org/wiki/Flat-file_database"&gt;flat file&lt;/A&gt; without any index or the like.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" ABC&amp;lt;clrf&amp;gt;DEF&amp;lt;clrf&amp;gt;JKL&amp;lt;clrf&amp;gt;&amp;lt;eof&amp;gt;
Depending on your code, you got
" ABC&amp;lt;clrf&amp;gt;DEFGHI&amp;lt;clrf&amp;gt;&amp;lt;clrf&amp;gt;&amp;lt;eof&amp;gt;
or
" ABC&amp;lt;clrf&amp;gt;DEFGHI&amp;lt;clrf&amp;gt;&amp;lt;eof&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can append new text at the end of the file, but not in the middle, so you should read the whole file (usually in an internal table splitting data at &amp;lt;crlf&amp;gt; with the IN TEXT MODE) insert/replace the text in your code and send the whole data back to the file.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 15:44:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-edit-line/m-p/12326099#M1991370</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2021-03-03T15:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset - Edit Line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-edit-line/m-p/12326100#M1991371</link>
      <description>&lt;P&gt;You can't insert in the middle of the file, you may only append at the end.&lt;/P&gt;&lt;P&gt;Even if someone invented an API to insert some text in the middle of the file, the whole file should be rewritten on the disk because the rest of the file is shifted.&lt;/P&gt;&lt;P&gt;Don't you want to use a database table instead?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 17:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-edit-line/m-p/12326100#M1991371</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-03-03T17:25:22Z</dc:date>
    </item>
  </channel>
</rss>

