<?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: Read dataset in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299515#M789754</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  reply,&lt;/P&gt;&lt;P&gt;Then what is the use of DO and ENDDO , when it reads the whole record.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shashikanth naram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jan 2008 19:48:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-22T19:48:34Z</dc:date>
    <item>
      <title>Read dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299513#M789752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know how this code is working.&lt;/P&gt;&lt;P&gt;I have give the parameter name for the file as p_flname and total it got 3 records.&lt;/P&gt;&lt;P&gt;In the first loop of DO it fetches the first record from p_flanme, its ok.&lt;/P&gt;&lt;P&gt;but, in the second Do loop how its knows that it has to fetch the second record as we have'nt given any condition in the READ statement.&lt;/P&gt;&lt;P&gt;This code is working porperly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET P_FLNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;CLEAR L_LINE.&lt;/P&gt;&lt;P&gt;READ DATASET P_FLNAME INTO L_LINE.&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;SPLIT L_LINE AT ',' INTO W_UPLOAD-BUKRS&lt;/P&gt;&lt;P&gt;                         W_UPLOAD-EKORG&lt;/P&gt;&lt;P&gt;                         W_UPLOAD-KTOKK&lt;/P&gt;&lt;P&gt;                         W_UPLOAD-ANRED&lt;/P&gt;&lt;P&gt;                         W_UPLOAD-NAME1&lt;/P&gt;&lt;P&gt;                         W_UPLOAD-SORTL&lt;/P&gt;&lt;P&gt;                         W_UPLOAD-LAND1&lt;/P&gt;&lt;P&gt;                         W_UPLOAD-AKONT&lt;/P&gt;&lt;P&gt;                         W_UPLOAD-FDGRV&lt;/P&gt;&lt;P&gt;                         W_UPLOAD-WAERS.&lt;/P&gt;&lt;P&gt;  APPEND W_UPLOAD TO T_UPLOAD.&lt;/P&gt;&lt;P&gt;  CLEAR W_UPLOAD.&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;thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;shashikanth naram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 19:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299513#M789752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T19:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Read dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299514#M789753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The READ DATASET statement reads an &lt;STRONG&gt;entire&lt;/STRONG&gt; record of the file except you specify a fixed length.&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;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 19:45:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299514#M789753</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-01-22T19:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299515#M789754</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  reply,&lt;/P&gt;&lt;P&gt;Then what is the use of DO and ENDDO , when it reads the whole record.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shashikanth naram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 19:48:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299515#M789754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T19:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Read dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299516#M789755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shashi,&lt;/P&gt;&lt;P&gt;READ DATASET statement - The content is read from the file starting from the current file pointer. After the data transfer, the file pointer is positioned after the section that was read. &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;Shaik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 19:51:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299516#M789755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T19:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Read dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299517#M789756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
OPEN DATASET P_FLNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.  " ensure that the file exists and can be opened

  DO.
    CLEAR: l_line.
    READ DATASET p_flname INTO l_line.  " read one record of file (EOF)

    IF ( syst-subrc NE '0' ).  " no record read -&amp;gt; end of file
      EXIT.
    ENDIF.

     " process read record
     ...
  ENDDO.  " continue reading next record until EOF

ENDIF.

&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;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 20:15:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299517#M789756</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-01-22T20:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Read dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299518#M789757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would probably help you a lot if you put your cursor on a READ statement and press F1. The documentation is quite good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 20:23:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset/m-p/3299518#M789757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T20:23:20Z</dc:date>
    </item>
  </channel>
</rss>

