<?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: reading an internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300436#M158248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vamshi,&lt;/P&gt;&lt;P&gt;I know that we cant use OR or anyother key words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i just want to know whether there is a record satisfying the conidition. i am already in a inner loop and if i use another then it may create performance issues. if u have any suggestions let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 May 2006 00:23:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-03T00:23:11Z</dc:date>
    <item>
      <title>reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300434#M158246</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;  I want to read the data from a itab where a particular field can have one of the three values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;Read itab with table key flag = X and ( number = 26 or number = 27 or number = 28. ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used select options but it didn&amp;#146;t work&amp;#133; give me the syntax to so that I can read the table with the above condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2006 23:46:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300434#M158246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-02T23:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300435#M158247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or condition cannot be used with read table. Use loop at with condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vamshi Tallada&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2006 00:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300435#M158247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-03T00:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300436#M158248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vamshi,&lt;/P&gt;&lt;P&gt;I know that we cant use OR or anyother key words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i just want to know whether there is a record satisfying the conidition. i am already in a inner loop and if i use another then it may create performance issues. if u have any suggestions let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2006 00:23:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300436#M158248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-03T00:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300437#M158249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the where clause of the loop and exit after one entry has been found:&lt;/P&gt;&lt;P&gt;loop at tab where matnr = 'a' or mandt = '300'.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;*entry found&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;*entry not found&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your example:&lt;/P&gt;&lt;P&gt;loop at itab where  flag = 'X' and ( number = 26 or number = 27 or number = 28 ).&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2006 00:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300437#M158249</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-05-03T00:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300438#M158250</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;I think don't use Loop Where, 'coz it may create performance issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try use Binary Search, like :&lt;/P&gt;&lt;P&gt;Sort ITAB By FLAG NUMBER.&lt;/P&gt;&lt;P&gt;Read Table Itab Binary Search With Key FLAG = X and NUMBER = 26.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop above process for Number = 27 and 28.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2006 01:34:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300438#M158250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-03T01:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300439#M158251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would sort the table by flag and number. Then:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
read table itab
  with key flag = 'X'
  binary search.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If sy-subrc = 0, check to see if number is 26, 27 or 28.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's not, and number is less than 29, do an indexed read:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
wk_index = sy-tabix + 1.
read table itab index wk_index.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If sy-subrc = 0 check that flag is still X and the number is 26, 27 or 28. Do the above while number is less than 29.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2006 02:46:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300439#M158251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-03T02:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300440#M158252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ganesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot depend on flag field to retrive your validated values 26,27,28 , better you can read thrice with binary search for 26,27,28 and check for flag. &lt;/P&gt;&lt;P&gt;You are saying already you have innerloops , please let me know the clear req.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Reward Points If It Helps YOU.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2006 06:39:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-an-internal-table/m-p/1300440#M158252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-03T06:39:24Z</dc:date>
    </item>
  </channel>
</rss>

