<?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: temp files in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/temp-files/m-p/2571854#M587267</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would store the data in a internal table while you are processing.  Then once processing has been completed you can move the contents of the internal table to a external file, the filename can be a parameter on the selection screen, or you can use the dynamic names mentioned earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this method each time a user executes the transaction/program ABAP will generate a separate working area on the disk for the internal table.  Even if you have 10 people running at the same time they will be witting to 10 different internal tables. All that is left is to manage the name of the external file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2007 16:37:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-31T16:37:21Z</dc:date>
    <item>
      <title>temp files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/temp-files/m-p/2571851#M587264</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; I am using a dataset to tempororily store some data in my program. the thing is if my program is executed by multiple users at a same time, the same dataset './mytempfile' is used and everything goes wrong. so suggest me how to overcome this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 OPEN DATASET './mytempfile' FOR OUTPUT IN BINARY MODE.
  IF sy-subrc EQ 0.
    LOOP AT t_myfile.
      TRANSFER t_myfile TO './mytempfile'.
    ENDLOOP.
    CLOSE DATASET './mytempfile'.
  ENDIF.


  OPEN DATASET './mytempfile' FOR INPUT IN BINARY MODE.
  IF sy-subrc EQ 0.
    DO.
      CLEAR t_mybin.
      READ DATASET './mytempfile' INTO t_mybin MAXIMUM LENGTH 255.
      IF sy-subrc NE 0.
        EXIT.
      ELSE.
        APPEND t_mybin.
      ENDIF.
    ENDDO.
    CLOSE DATASET './mytempfile'.
  ENDIF.


  DELETE DATASET './mytempfile'.
  IF sy-subrc NE 0.
    MESSAGE 'Error when deleting MY file'(008) TYPE 'I'.
    LEAVE LIST-PROCESSING.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 13:01:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/temp-files/m-p/2571851#M587264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T13:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: temp files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/temp-files/m-p/2571852#M587265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I don;t know why you are using a dataset to temp store data but if you must. You can use something to make each file name unique, maybe add the username to the end of the file and if that is not enough then perhaps a timestamp or long timestamp.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 14:23:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/temp-files/m-p/2571852#M587265</guid>
      <dc:creator>former_member378318</dc:creator>
      <dc:date>2007-07-31T14:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: temp files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/temp-files/m-p/2571853#M587266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you can create dynamic file names. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file names can be a concatenation of filename + date + time + username + random number.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;please reward points for the useful answers &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 14:41:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/temp-files/m-p/2571853#M587266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T14:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: temp files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/temp-files/m-p/2571854#M587267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would store the data in a internal table while you are processing.  Then once processing has been completed you can move the contents of the internal table to a external file, the filename can be a parameter on the selection screen, or you can use the dynamic names mentioned earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this method each time a user executes the transaction/program ABAP will generate a separate working area on the disk for the internal table.  Even if you have 10 people running at the same time they will be witting to 10 different internal tables. All that is left is to manage the name of the external file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 16:37:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/temp-files/m-p/2571854#M587267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T16:37:21Z</dc:date>
    </item>
  </channel>
</rss>

