<?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: DATASET program in Windows OS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855644#M47133</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No way! you can use open datset to write to presentation server. for that purpose you need to use gui_download function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a note from ABAP key word documentation for open dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;The system must be able to reach the file from the current application server. You cannot edit files from the current presentation server. If you need to do this, use the function modules GUI_DOWNLOAD and GUI_UPLOAD.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Dec 2004 09:16:13 GMT</pubDate>
    <dc:creator>athavanraja</dc:creator>
    <dc:date>2004-12-28T09:16:13Z</dc:date>
    <item>
      <title>DATASET program in Windows OS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855641#M47130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;   Below is the source of my Dataset program.&lt;/P&gt;&lt;P&gt; It doesn't create a file specfied in the code which is supposed to.&lt;/P&gt;&lt;P&gt; I just got this code in the ABAP documentation samples but the document stated that it works only under UNIX systems. I need to do this under Windows environment. Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT DATASET_DEMO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA FNAME(60) VALUE 'C:\TEMP\myfile.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;         COL1 TYPE I,&lt;/P&gt;&lt;P&gt;         COL2 TYPE I,&lt;/P&gt;&lt;P&gt;       END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES  ITAB TYPE LINE OCCURS 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LIN TYPE LINE,&lt;/P&gt;&lt;P&gt;      TAB TYPE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 5 TIMES.&lt;/P&gt;&lt;P&gt;  LIN-COL1 = SY-INDEX.&lt;/P&gt;&lt;P&gt;  LIN-COL2 = SY-INDEX ** 2.&lt;/P&gt;&lt;P&gt;  APPEND LIN TO TAB.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET FNAME FOR OUTPUT.&lt;/P&gt;&lt;P&gt;LOOP AT TAB INTO LIN.&lt;/P&gt;&lt;P&gt;  TRANSFER LIN TO FNAME.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;CLOSE DATASET FNAME.&lt;/P&gt;&lt;P&gt;    &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need your help on this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2004 07:05:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855641#M47130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-28T07:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: DATASET program in Windows OS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855642#M47131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeffrey, &lt;/P&gt;&lt;P&gt;are you trying to store files on the client? Then you should use Function Module GUI_DOWNLOAD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open dataset does work on application server with OS WINDOWS.&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2004 07:34:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855642#M47131</guid>
      <dc:creator>ChristianFi</dc:creator>
      <dc:date>2004-12-28T07:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: DATASET program in Windows OS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855643#M47132</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;This program will work with Windows OS also. But the first thing you have to see is whether the folder C:\temp is visible to SAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  You just make a change to your code instead of &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA FNAME(60) VALUE 'C:\TEMP\myfile.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA FNAME(60) VALUE 'myfile.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will write to the folder specified in DIR_HOME. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If you want to write specifically to a folder in application server, get with your basis team and get the list of folders visible to SAP and use the corresponding folders. Instead you can use the logical path also. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vishnu Aravind A.V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2004 07:58:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855643#M47132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-28T07:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: DATASET program in Windows OS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855644#M47133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No way! you can use open datset to write to presentation server. for that purpose you need to use gui_download function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a note from ABAP key word documentation for open dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;The system must be able to reach the file from the current application server. You cannot edit files from the current presentation server. If you need to do this, use the function modules GUI_DOWNLOAD and GUI_UPLOAD.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2004 09:16:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855644#M47133</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2004-12-28T09:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: DATASET program in Windows OS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855645#M47134</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;1) If you want to download file to an Application server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this out,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data fname value &amp;lt;file&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset fname for output.&lt;/P&gt;&lt;P&gt; text1 ='Sample Data'.&lt;/P&gt;&lt;P&gt; transfer text1 to fname.&lt;/P&gt;&lt;P&gt;close dataset fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Above Statements will put the data into the file specified by &amp;lt;file&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you are performing repeated write operation in the same file use,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset fname for appending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will append data to the existing file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) If you want to download data to your system,&lt;/P&gt;&lt;P&gt;Then try the following code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call function 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;P&gt;     codepage                      = ' '&lt;/P&gt;&lt;P&gt;     filename                      = 'D:\DATA.TXT'&lt;/P&gt;&lt;P&gt;     filetype                      = 'ASC'&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      data_tab                      = itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can try the same with GUI_DOWNLOAD as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                        = 'D:\sample.txt'&lt;/P&gt;&lt;P&gt;     FILETYPE                        = 'ASC'&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      data_tab                        = itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will solve the problem,&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Kathir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2004 12:33:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855645#M47134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-28T12:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: DATASET program in Windows OS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855646#M47135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;  Thanks a lot for the info.&lt;/P&gt;&lt;P&gt;Anyway, the reason why I used DATASET instead of fm GUI_DOWNLOAD is I need to to upload data into a text file with different sections and structures. The file has a header (comma delimited), detail (TAB delimited) and a footer (also comma delimited).&lt;/P&gt;&lt;P&gt;  Actually, I did some work around on this. What I did was I created an internal table having one column with a TAB/Comma delimited data and I used fm WS_DOWNLOAD.&lt;/P&gt;&lt;P&gt;  I am just asking if there is another way to do it aside from what I did.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2004 15:37:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-program-in-windows-os/m-p/855646#M47135</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-28T15:37:37Z</dc:date>
    </item>
  </channel>
</rss>

