<?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: error when read dataset - file not open in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120357#M740999</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OPEN DATASET works only on app server files, for presentation server files, u have to use GUI_UPLOAD function module&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2007 11:04:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-20T11:04:59Z</dc:date>
    <item>
      <title>error when read dataset - file not open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120354#M740996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I m having a text file in my 'C:\' , say - p_file = 'C:\test.txt'  i m trying to open this file using &lt;/P&gt;&lt;P&gt; OPEN DATASET p_file FOR OUTPUT IN TEXT MODE encoding default.&lt;/P&gt;&lt;P&gt;and tried reading the file using&lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;READ DATASET p_file into line.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but im getting runtime error saying " file not open". how to read the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regs,&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 11:00:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120354#M740996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T11:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: error when read dataset - file not open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120355#M740997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; it seems you are reading file from Local system. Use GUI_UPLOAD to read text file from local system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 11:03:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120355#M740997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T11:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: error when read dataset - file not open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120356#M740998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR I&amp;lt;b&amp;gt;NPUT&amp;lt;/b&amp;gt; IN TEXT MODE encoding default.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 11:03:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120356#M740998</guid>
      <dc:creator>former_member188829</dc:creator>
      <dc:date>2007-11-20T11:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: error when read dataset - file not open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120357#M740999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OPEN DATASET works only on app server files, for presentation server files, u have to use GUI_UPLOAD function module&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 11:04:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120357#M740999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T11:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: error when read dataset - file not open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120358#M741000</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;    FOR OUTPUT means ur trying to write, but i think ur trying to write in existing file. If  file is already exist then use FOR APPENDING, otherwise FOR OUTPUT&lt;/P&gt;&lt;P&gt;will create new file automatically for write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form open_file.&lt;/P&gt;&lt;P&gt;  if p_aserv eq 'X'.&lt;/P&gt;&lt;P&gt;    open dataset p_path for output in text mode encoding default.&lt;/P&gt;&lt;P&gt;    if sy-subrc ne 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Download Failed'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      message e000(8i) with 'Error in File opening for download'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endform.                    " open_file&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>Tue, 20 Nov 2007 11:06:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120358#M741000</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-11-20T11:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: error when read dataset - file not open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120359#M741001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first check whether u r having authorization or not to create file in application server because i faced the same problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 11:50:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120359#M741001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T11:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: error when read dataset - file not open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120360#M741002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raja,&lt;/P&gt;&lt;P&gt;u cant use OPEN DATASET statemen to handel the in the presentation server.&lt;/P&gt;&lt;P&gt;while using the presentation server, u have to use UPLOAD FM and u should read into internal table  and then u can start using the records from itab...&lt;/P&gt;&lt;P&gt;if u use OPEN DATASET statemen to handel the in the presentation server, then u will get  sy-subrc = 8 ( Operating system could not open file ).&lt;/P&gt;&lt;P&gt;sample code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:  	BEGIN OF INREC,&lt;/P&gt;&lt;P&gt;		   KUNNR LIKE KNA1-KUNNR,&lt;/P&gt;&lt;P&gt;		   REGIO  LIKE KNA1-REGIO,&lt;/P&gt;&lt;P&gt;		   TELF1  LIKE KNA1-TELF1,&lt;/P&gt;&lt;P&gt;		END OF INREC.&lt;/P&gt;&lt;P&gt;DATA:	IN_ITAB TYPE INREC&lt;/P&gt;&lt;P&gt;		   OCCURS 10 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION &amp;#145;UPLOAD&amp;#146;&lt;/P&gt;&lt;P&gt;	EXPORTING&lt;/P&gt;&lt;P&gt;		FILENAME	= &amp;#145;c:\bc180_file2&amp;#146;&lt;/P&gt;&lt;P&gt;	TABLES&lt;/P&gt;&lt;P&gt;		DATA_TAB	= IN_ITAB.&lt;/P&gt;&lt;P&gt;LOOP AT IN_ITAB.&lt;/P&gt;&lt;P&gt;	WRITE: / 	IN_ITAB-KUNNR,&lt;/P&gt;&lt;P&gt;			IN_ITAB-REGIO,&lt;/P&gt;&lt;P&gt;			IN_ITAB-TELF1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 12:31:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120360#M741002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T12:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: error when read dataset - file not open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120361#M741003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raja,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    i write a code for ur problem and i check whether it is executing or not.The code that i written is executed sucessfully.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   I am sending  two programs both output the data to dataset and also   input the data to dataset.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   First execute the first program and then run the second program.ok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u are satisfy with the code PLZ give me the REWARD POINTS..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CODE FOR OUTPUT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       text(50),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append data to Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-text = 'DEMO BDC FIRST LINE'.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-text = 'DEMO BDC SECOND LINE'.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OPEN THE DATASET&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'ZBDCDEMO' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Transfer the data to APPSERVER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TRANSFER itab TO 'ZBDCDEMO'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Close the Dataset&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'ZBDCDEMO'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CODE FOR INPUT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       text(50),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OPEN THE DATASET&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'ZBDCDEMO' FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;READ THE DATA FROM THE DATASET AND PLACE THEM IN ITAB&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt;read dataset 'ZBDCDEMO' into itab.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; append itab.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt; exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display the Data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  write: / itab-text.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display the Data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; close dataset 'ZBDCDEMO'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 12:35:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-read-dataset-file-not-open/m-p/3120361#M741003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T12:35:41Z</dc:date>
    </item>
  </channel>
</rss>

