<?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: Does we need to Create a file Before using Open dataSet in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359858#M521911</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;  open dataset &amp;lt;file&amp;gt; for output in text mode encoding non-unicode.&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    loop at it_ekpo. "Internal Table with header line&lt;/P&gt;&lt;P&gt;      transfer it_ekpo to &amp;lt;file&amp;gt;.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;    close dataset &amp;lt;file&amp;gt;.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are several changes you can make:&lt;/P&gt;&lt;P&gt;open dataset ... in legacy text mode.&lt;/P&gt;&lt;P&gt;or open .. fo appending.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2007 16:41:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-05T16:41:34Z</dc:date>
    <item>
      <title>Does we need to Create a file Before using Open dataSet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359854#M521907</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;            Can  any body tell me whether we have to create a File before using Open dataset  for writing files in Application Server.&lt;/P&gt;&lt;P&gt;           Can anybody write a program for EKPO table to store it in application Server using OpendatasSet ?Is there any specific care we have to take for Executing   pgm in Background? &lt;/P&gt;&lt;P&gt; I wrote the pgm for Foreground using GUI- Download.&lt;/P&gt;&lt;P&gt;PGM.&lt;/P&gt;&lt;P&gt;*******&lt;/P&gt;&lt;P&gt;      select * into table it_ekpo  from  ekpo .&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 ='c:\EKPO.xls'&lt;/P&gt;&lt;P&gt;filetype = 'ASC'&lt;/P&gt;&lt;P&gt;WRITE_FIELD_SEPARATOR = 'X'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = it_ekpo&lt;/P&gt;&lt;P&gt;*fieldnames = l_heading&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;file_write_error = 1&lt;/P&gt;&lt;P&gt;no_batch = 2&lt;/P&gt;&lt;P&gt;gui_refuse_filetransfer = 3 .&lt;/P&gt;&lt;P&gt;                   Plzzzzzzzzz Make the changes for existing Pgm.any help is awarded with points.Its Urgent.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gopi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 16:28:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359854#M521907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T16:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Does we need to Create a file Before using Open dataSet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359855#M521908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;open dataset p_fil for output in text mode .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above command work like if file already exits then it will overwrite the recrds ,if not it create new file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 16:36:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359855#M521908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T16:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Does we need to Create a file Before using Open dataSet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359856#M521909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;yes Create a file: p_file&lt;/P&gt;&lt;P&gt;and put your data in ITAB after fetching from table EKPO.&lt;/P&gt;&lt;P&gt;Open dataset p_file for appending in text mode.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  loop at itab.&lt;/P&gt;&lt;P&gt;     transfer itab to p_file.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;close dataset p_file.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 16:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359856#M521909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T16:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Does we need to Create a file Before using Open dataSet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359857#M521910</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;Here sample code to write data to app. server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 DATA FILENAME(20) VALUE '/USR/TEMP/TEST.DAT'.

OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE.
LOOP AT ITAB.                           " ITAB here is contains EKPO data
TRANSFER ITAB TO FILENAME.
ENDLOOP.
CLOSE DATASET FILENAME. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 16:39:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359857#M521910</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-06-05T16:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Does we need to Create a file Before using Open dataSet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359858#M521911</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;  open dataset &amp;lt;file&amp;gt; for output in text mode encoding non-unicode.&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    loop at it_ekpo. "Internal Table with header line&lt;/P&gt;&lt;P&gt;      transfer it_ekpo to &amp;lt;file&amp;gt;.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;    close dataset &amp;lt;file&amp;gt;.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are several changes you can make:&lt;/P&gt;&lt;P&gt;open dataset ... in legacy text mode.&lt;/P&gt;&lt;P&gt;or open .. fo appending.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 16:41:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359858#M521911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T16:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Does we need to Create a file Before using Open dataSet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359859#M521912</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 for ur immediate response.I am sending the code just confirm me whether is correct r not?&lt;/P&gt;&lt;P&gt;              &lt;/P&gt;&lt;P&gt;DATA : wa_EKPO_file   TYPE file_table-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into table it_ekpo  from  ekpo .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET wa_EKPO_file FOR OUTPUT         "Write to appl. server&lt;/P&gt;&lt;P&gt;                                      IN TEXT MODE&lt;/P&gt;&lt;P&gt;                                      ENCODING DEFAULT.  "Open dataset Return code&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt; LOOP at IT_EKPO into WA_EKPO.&lt;/P&gt;&lt;P&gt; TRANSFER wa_ekpo to wa_ekpo_file.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;                                         I want write the data into SPREAD Sheet .Can u guys  tell me how to write into Spread Sheet using Open data Set.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gopi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 16:54:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-we-need-to-create-a-file-before-using-open-dataset/m-p/2359859#M521912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T16:54:57Z</dc:date>
    </item>
  </channel>
</rss>

