<?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 Statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033638#M84569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to use the loop statement with condition gt ge lt le .. (&amp;gt; &amp;gt;= &amp;lt; &amp;lt;= )  and to exit to the first line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_table where datab =&amp;lt; wa_st-datum and datbi &amp;gt;= wa_st-datum.
  exit.
endloop.
if sy-subrc eq space.
  ... had your code ...
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Oct 2005 11:38:38 GMT</pubDate>
    <dc:creator>FredericGirod</dc:creator>
    <dc:date>2005-10-27T11:38:38Z</dc:date>
    <item>
      <title>Read Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033631#M84562</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;       I am new to ABAP ,could any one explain me the READ statment,&lt;/P&gt;&lt;P&gt;1. Is it specific any internal table type&lt;/P&gt;&lt;P&gt;2. How is readind data different from using loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2005 11:04:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033631#M84562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-27T11:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033632#M84563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why dont you use the online help? Just position the cursor on the keyword read and press F1, all your questions will be answered there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2005 11:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033632#M84563</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2005-10-27T11:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033633#M84564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aima,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you use LOOP, you will read all the data of the table. When you use READ, you will read only one line of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example a loop can be replace by.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;describe table it_data lines v_count.
do.
  v_countb = v_countb + 1.
  if v_countb gt v_count.
    exit
  endif.
  read table it_data index v_countb.
enddo.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I didn't check the code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read allow condition of selection, but you must be sure that this condition will only answer one line. Or you will not be sure that the answer will be the good one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look of the transaction ABAPDOCU for all advanced documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Frédéric&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2005 11:12:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033633#M84564</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2005-10-27T11:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033634#M84565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aima,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ is for reading record from any type of internal table using index or with fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP statement will loop through the internal table record by record, based on the condition given if any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2005 11:13:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033634#M84565</guid>
      <dc:creator>Vinod_Chandran</dc:creator>
      <dc:date>2005-10-27T11:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033635#M84566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Suppose, the records in an internal table(it_table) with field ID are &lt;/P&gt;&lt;P&gt;1 2 3 4 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we say:&lt;/P&gt;&lt;P&gt;Read table it_table with key id = '3'.&lt;/P&gt;&lt;P&gt;the number of records processed will be only 3.&lt;/P&gt;&lt;P&gt;if we say :&lt;/P&gt;&lt;P&gt;loop at it_table where id = '3'.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;the number of records processed will be 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the number of records processed in case of both read and loop will be same if record is not found.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2005 11:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033635#M84566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-27T11:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033636#M84567</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;Using read statement,you can only read single record.&lt;/P&gt;&lt;P&gt;But using loop,you can read more than one record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2005 11:18:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033636#M84567</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-10-27T11:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033637#M84568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,Firstly thanq for all ur replies,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Is it possible to use read statement for checking a validity date,i mean every syntax of READ uses '=' while checking the condition  but for me the validaity date lies between two fields and specifing the condition like&lt;/P&gt;&lt;P&gt;datab =&amp;lt; wa_st-datum and datbi &amp;gt;= wa_st-datum&lt;/P&gt;&lt;P&gt;this will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2005 11:35:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033637#M84568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-27T11:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033638#M84569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to use the loop statement with condition gt ge lt le .. (&amp;gt; &amp;gt;= &amp;lt; &amp;lt;= )  and to exit to the first line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_table where datab =&amp;lt; wa_st-datum and datbi &amp;gt;= wa_st-datum.
  exit.
endloop.
if sy-subrc eq space.
  ... had your code ...
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2005 11:38:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1033638#M84569</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2005-10-27T11:38:38Z</dc:date>
    </item>
  </channel>
</rss>

