<?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: Regarding Read statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222400#M1207552</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 possible, you can get data only for BUZID = 'W' , 'T' or 'S' while selecting the data at first step itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If step not possible, then you can write following loop statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT tbl_bseg WHERE ( buzid eq 'W'&lt;/P&gt;&lt;P&gt;                                       or  buzid eq 'T'&lt;/P&gt;&lt;P&gt;                                       or  buzid eq 'S' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Process as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Here if you have requirement like, you have to process only 1 record, then just getting once into &lt;/P&gt;&lt;/LI&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;loop, after first processing you use 'EXIT'. &lt;/P&gt;&lt;/LI&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Let me know your requirement.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Feb 2009 06:23:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-23T06:23:21Z</dc:date>
    <item>
      <title>Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222391#M1207543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;      iam getting syntax error please suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table tbl_bseg with key  buzid = ( 'W' OR 'T' OR 'S' ) BINARY SEARCH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 04:29:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222391#M1207543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T04:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222392#M1207544</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;YOu can't take the multiple values at at time.&lt;/P&gt;&lt;P&gt;instead take the ranges for those values an compare..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Ranges: r_buzid   for xxx-buzid   " consider your table

r_buzid-sign = 'I'
r_buzid-option = 'EQ'
r_buzid-low = 'W'.
append r_buzid.

r_buzid-sign = 'I'
r_buzid-option = 'EQ'
r_buzid-low = 'T'.
append r_buzid.

r_buzid-sign = 'I'
r_buzid-option = 'EQ'
r_buzid-low = 'S'.
append r_buzid.


read table tbl_bseg with key buzid = r_buzid BINARY SEARCH.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 04:37:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222392#M1207544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T04:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222393#M1207545</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; First make ranges as Prashant said above, then in the loop of range read the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 04:45:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222393#M1207545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T04:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222394#M1207546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the follwoing test code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF it OCCURS 10,
  name(1),
  END OF it.

it-name = 'A'.
APPEND it TO it.
it-name = 'Z'.
APPEND it TO it.
it-name = 'C'.
APPEND it TO it.
it-name = 'D'.
APPEND it TO it.
it-name = 'X'.
APPEND it TO it.
it-name = 'Y'.
APPEND it TO it.

SORT it BY name.


READ TABLE it INTO it WITH KEY name = 'A' BINARY SEARCH.
IF sy-subrc EQ 0.
  WRITE: / 'Read Table',  it-name.
ENDIF.
*if you want read more records from internal table using one key field than you must use Loop at

LOOP AT it INTO it WHERE name = 'A' OR name = 'C'.
  WRITE: / 'Loop At',  it-name.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Edited by: tahir naqqash on Feb 23, 2009 10:05 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tahir naqqash on Feb 23, 2009 10:08 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 05:02:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222394#M1207546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T05:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222395#M1207547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Read statement is not conditional . You can use rangrs or loop at the internal table and put the restrictions in where clause. Also , sort the internal table before reading it.Sorting and reading sequence should be same ; otherwise binary search may not work properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 05:21:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222395#M1207547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T05:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222396#M1207548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;     You can use " if " and "Sy-subrc" in combination to "read " the data with all the OR clause.&lt;/P&gt;&lt;P&gt;     This time of Read statement that u have used will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 05:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222396#M1207548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T05:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222397#M1207549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 06:12:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222397#M1207549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T06:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222398#M1207550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;In read syntax, AND / Or is not appilcable so you have to check the required conditions put it under loop.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shashi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 06:14:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222398#M1207550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T06:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222399#M1207551</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;in read staement conditional operators are not allowed.U insert that inro one range variable.then loop on tht range.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 06:17:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222399#M1207551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T06:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222400#M1207552</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 possible, you can get data only for BUZID = 'W' , 'T' or 'S' while selecting the data at first step itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If step not possible, then you can write following loop statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT tbl_bseg WHERE ( buzid eq 'W'&lt;/P&gt;&lt;P&gt;                                       or  buzid eq 'T'&lt;/P&gt;&lt;P&gt;                                       or  buzid eq 'S' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Process as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Here if you have requirement like, you have to process only 1 record, then just getting once into &lt;/P&gt;&lt;/LI&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;loop, after first processing you use 'EXIT'. &lt;/P&gt;&lt;/LI&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Let me know your requirement.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 06:23:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222400#M1207552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T06:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222401#M1207553</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 possible, you can get data only for BUZID = 'W' , 'T' or 'S' while selecting the data at first step itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If step not possible, then you can write following loop statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT tbl_bseg WHERE ( buzid eq 'W'&lt;/P&gt;&lt;P&gt;                                       or  buzid eq 'T'&lt;/P&gt;&lt;P&gt;                                       or  buzid eq 'S' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Process as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Here if you have requirement like, you have to process only 1 record, then just getting once into &lt;/P&gt;&lt;/LI&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;loop, after first processing you use 'EXIT'. &lt;/P&gt;&lt;/LI&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Let me know your requirement.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 06:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-read-statement/m-p/5222401#M1207553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T06:24:48Z</dc:date>
    </item>
  </channel>
</rss>

