<?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: open dataset dump. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567020#M256162</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;From your code,I understood that you are opening p_infile for input using open dataset.&lt;/P&gt;&lt;P&gt;But closed p_oufile using close_dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Oct 2006 03:58:25 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2006-10-17T03:58:25Z</dc:date>
    <item>
      <title>open dataset dump.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567017#M256159</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;I am getting OPEN DATASET SHORTDUMP using below code.&lt;/P&gt;&lt;P&gt;can somebody suggest me alteration of code..&lt;/P&gt;&lt;P&gt;Dump says error in READ statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_EDIT OCCURS 0,&lt;/P&gt;&lt;P&gt;         CNO(5)         TYPE C,&lt;/P&gt;&lt;P&gt;         DATE(8)        TYPE C,&lt;/P&gt;&lt;P&gt;         VENDOR(10)     TYPE C,&lt;/P&gt;&lt;P&gt;         MATERIAL(18)   TYPE C,&lt;/P&gt;&lt;P&gt;         STARTDT(8)     TYPE C,&lt;/P&gt;&lt;P&gt;         ENDDT(8)       TYPE C,&lt;/P&gt;&lt;P&gt;         QUANTITY(13)   TYPE N,&lt;/P&gt;&lt;P&gt;       END OF IT_EDIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET P_INFILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    IF NOT SY-SUBRC IS INITIAL.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;      READ DATASET P_OUFILE INTO IT_EDIT.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;      APPEND IT_EDIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;  CLOSE DATASET P_OUFILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chandra.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 03:23:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567017#M256159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T03:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: open dataset dump.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567018#M256160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Chan,&lt;/P&gt;&lt;P&gt; Declare &amp;lt;b&amp;gt;P_OUFILE&amp;lt;/b&amp;gt; as RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;lt;b&amp;gt;data : P_OUFILE like RLGRAP-FILENAME.&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 03:27:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567018#M256160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T03:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: open dataset dump.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567019#M256161</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;  Post the short dump description..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 03:28:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567019#M256161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T03:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: open dataset dump.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567020#M256162</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;From your code,I understood that you are opening p_infile for input using open dataset.&lt;/P&gt;&lt;P&gt;But closed p_oufile using close_dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 03:58:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567020#M256162</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-10-17T03:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: open dataset dump.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567021#M256163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ambi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  As i can see that you are trying to open the dataset for &amp;lt;b&amp;gt;downloading&amp;lt;/b&amp;gt; the data, in this case proceed as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  open dataset p_file for &amp;lt;b&amp;gt;input&amp;lt;/b&amp;gt; in text mode encoding default.
  if sy-subrc ne 0.
*** Error Message
  else.
*** Supposing itab has the records to be downloaded and 
***   &amp;lt;wa&amp;gt; is the workarea
    loop at itab into &amp;lt;wa&amp;gt;.
         transfer &amp;lt;wa&amp;gt; to p_file.
    endloop.
    close dataset p_file.
  endif.


  Incase of &amp;lt;b&amp;gt;uploading&amp;lt;/b&amp;gt; the code should be something like below:

  open dataset p_file for &amp;lt;b&amp;gt;output&amp;lt;/b&amp;gt; in text mode encoding default.
  if sy-subrc ne 0.
*** Error Message
  else.
    do.
       read dataset p_file into &amp;lt;wa&amp;gt;.
       if sy-subrc ne 0.
          exit.
       else.
          append &amp;lt;wa&amp;gt; to itab.
       endif.
    enddo.
    close dataset p_file.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Hope the above info can give you some idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 05:07:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567021#M256163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T05:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: open dataset dump.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567022#M256164</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;pls chk this sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zfiles_0001.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt',&lt;/P&gt;&lt;P&gt;            d2 type localfile default '/usr/sap/TST/SYS/Data2.txt'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data: itab type table of string.&lt;/P&gt;&lt;P&gt;data: wa type string.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  open dataset d1 for input in text mode.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    do.&lt;/P&gt;&lt;P&gt;      read dataset d1 into wa.&lt;/P&gt;&lt;P&gt;      if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        exit.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      append wa to itab.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  close dataset d1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Copy to new file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  open dataset d2 for output in text mode.&lt;/P&gt;&lt;P&gt;  loop at itab into wa.&lt;/P&gt;&lt;P&gt;    transfer wa to d2.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  close dataset d2.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Delete the first&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  delete dataset d1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hlpful pls mark points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 05:21:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567022#M256164</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-10-17T05:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: open dataset dump.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567023#M256165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ambi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try out this...&lt;/P&gt;&lt;P&gt;Declare p_infile with LOWER CASE addition, as each and every Unix command must be in lowercase.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vinny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 05:34:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-dump/m-p/1567023#M256165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T05:34:42Z</dc:date>
    </item>
  </channel>
</rss>

