<?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: File open problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8606998#M1662889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like the filename (dataset name) is not being changed between the two proposals.&amp;nbsp; This is how I would expect the overlay to occur....&amp;nbsp; the flow should be like:&lt;/P&gt;&lt;P&gt;{code}lv_filen = set your filename value here.&lt;/P&gt;&lt;P&gt;open dataset lv_filen for output in text mode encoding default...etc.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp; loop at....&lt;/P&gt;&lt;P&gt;&amp;nbsp; transfer...to lv_filen.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;close dataset lv_filen.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;* error routine.&lt;/P&gt;&lt;P&gt;endif.&amp;nbsp; {code}&lt;/P&gt;&lt;P&gt;then do it all again from the lv_filen = ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Mar 2012 11:49:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-03-16T11:49:02Z</dc:date>
    <item>
      <title>File open problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8606996#M1662887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expert,&lt;/P&gt;&lt;P&gt;I have a program scheduled in background mode for which it runs for several time in one batch job and creates multiple proposals. The problem i am facing is sometimes when it creates second proposal it overwrites first proposal. So i might think that this is due to first file is opened when it is processing for second file. File is created on application server. Can you please suggest me how i can handle this situation so that first file must be closed while it will go for second file creation. close_dataset is used in the program.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 11:40:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8606996#M1662887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-16T11:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: File open problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8606997#M1662888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Close first file using CLOSE DATASET and then open second file and process......&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 11:48:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8606997#M1662888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-16T11:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: File open problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8606998#M1662889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like the filename (dataset name) is not being changed between the two proposals.&amp;nbsp; This is how I would expect the overlay to occur....&amp;nbsp; the flow should be like:&lt;/P&gt;&lt;P&gt;{code}lv_filen = set your filename value here.&lt;/P&gt;&lt;P&gt;open dataset lv_filen for output in text mode encoding default...etc.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp; loop at....&lt;/P&gt;&lt;P&gt;&amp;nbsp; transfer...to lv_filen.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;close dataset lv_filen.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;* error routine.&lt;/P&gt;&lt;P&gt;endif.&amp;nbsp; {code}&lt;/P&gt;&lt;P&gt;then do it all again from the lv_filen = ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 11:49:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8606998#M1662889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-16T11:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: File open problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8606999#M1662890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pls try to include timestamp...it will solve ....&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 11:53:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8606999#M1662890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-16T11:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: File open problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8607000#M1662891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your reply. Actually file name is changed everytime it creates the file. We have ZTABLE associated with the program in which counter gets automatically incremented in that table and program takes this counter number appended to the file name. But sometimes it is not happening.&lt;/P&gt;&lt;P&gt;Suppose i have schduled batch job today and ZTABLE has counter 122 now. Batch job has two proposals to process then first proposal will have the name TEST122 and second will have TEST123. But in some cases both the proposals are appearing as TEST122.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 11:55:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8607000#M1662891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-16T11:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: File open problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8607001#M1662892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, but from my viewpoint, this has to be an error in the program that is failing to update the counter, or there is some situation in which the filename is not being set correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 12:59:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-open-problem/m-p/8607001#M1662892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-16T12:59:00Z</dc:date>
    </item>
  </channel>
</rss>

