<?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: Open Dataset For Update in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-update/m-p/6716436#M1454661</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;I'm not sure if you can update immediately. What u can do is upload the file in an internal table. Make the necessary changes in the internal table. Then download the fle on the server with the same name. U can delete the file before downloading it again, else it overwrites the existing file (whatever way u want it to be).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jaspreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Mar 2010 11:21:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-16T11:21:33Z</dc:date>
    <item>
      <title>Open Dataset For Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-update/m-p/6716434#M1454659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ABAP experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible to read and update a file during a loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to open the file with "FOR UPDATE" and if a file record contain a customer number than this number should be immediatelly updated. But it doesn't work. Has anybody an idea what I did wrong in the following coding?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file could be correctly opened and also the CONCATENATE works fine but the TRANSFER did not save the change in the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET p_file FOR UPDATE IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    WRITE: 'Error when opening file: ', p_file.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;      READ DATASET p_file INTO wa_file.&lt;/P&gt;&lt;P&gt;      IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;        CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set prefix "0301" for any customer number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        IF wa_file(1) EQ '1'.&lt;/P&gt;&lt;P&gt;          GET DATASET p_file POSITION w_pos.&lt;/P&gt;&lt;P&gt;          CONCATENATE '0301' wa_file&lt;EM&gt;5(6) INTO wa_file&lt;/EM&gt;5(10).&lt;/P&gt;&lt;P&gt;          SET DATASET p_file POSITION w_pos.&lt;/P&gt;&lt;P&gt;          TRANSFER wa_file TO p_file.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 10:46:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-update/m-p/6716434#M1454659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-16T10:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset For Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-update/m-p/6716435#M1454660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the use of the GET / SET DATASET statements ? Why do you use them ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 11:11:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-update/m-p/6716435#M1454660</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-03-16T11:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset For Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-update/m-p/6716436#M1454661</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;I'm not sure if you can update immediately. What u can do is upload the file in an internal table. Make the necessary changes in the internal table. Then download the fle on the server with the same name. U can delete the file before downloading it again, else it overwrites the existing file (whatever way u want it to be).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jaspreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 11:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-update/m-p/6716436#M1454661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-16T11:21:33Z</dc:date>
    </item>
  </channel>
</rss>

