<?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 READ Table With Key not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355597#M1037038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE gt_findpartners WITH KEY&lt;/P&gt;&lt;P&gt;              z3isptrxtyp = wa_z3isp_inv_conv-z3isptrxtyp&lt;/P&gt;&lt;P&gt;              z3ispordno  = wa_z3isp_inv_conv-z3ispordno&lt;/P&gt;&lt;P&gt;                  BINARY SEARCH TRANSPORTING NO FIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Odd because at one time I believe the code was working fine, not sure vwhat I could have changed to stop this from working. But the rec is definitely in the tab it is reading and I get a sy-sub = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Thank-You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2008 11:40:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-29T11:40:16Z</dc:date>
    <item>
      <title>READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355597#M1037038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE gt_findpartners WITH KEY&lt;/P&gt;&lt;P&gt;              z3isptrxtyp = wa_z3isp_inv_conv-z3isptrxtyp&lt;/P&gt;&lt;P&gt;              z3ispordno  = wa_z3isp_inv_conv-z3ispordno&lt;/P&gt;&lt;P&gt;                  BINARY SEARCH TRANSPORTING NO FIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Odd because at one time I believe the code was working fine, not sure vwhat I could have changed to stop this from working. But the rec is definitely in the tab it is reading and I get a sy-sub = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Thank-You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:40:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355597#M1037038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T11:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355598#M1037039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using binary search you need to sort the table on the fields you are using as a key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:41:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355598#M1037039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T11:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355599#M1037040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check whether you have sorted gt_findpartners by z3isptrxtyp and &lt;/P&gt;&lt;P&gt;z3ispordno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not sort it before reading it using binary search.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:41:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355599#M1037040</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2008-08-29T11:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355600#M1037041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The table is not sorted. Binary search is failing because of that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355600#M1037041</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-08-29T11:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355601#M1037042</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;To use the binary search you need to have a sorted table by the keys that you want to search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:42:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355601#M1037042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T11:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355602#M1037043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ignore, if you already used the SORT on the key fields.&lt;/P&gt;&lt;P&gt;It is always must to sort the table before binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT gt_findpartners by z3isptrxtyp  z3ispordn.

READ TABLE gt_findpartners WITH KEY
z3isptrxtyp = wa_z3isp_inv_conv-z3isptrxtyp
z3ispordno = wa_z3isp_inv_conv-z3ispordno
BINARY SEARCH TRANSPORTING NO FIELDS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:42:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355602#M1037043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T11:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355603#M1037044</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;Remove the Binary Search.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kunjal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:45:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355603#M1037044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T11:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355604#M1037045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope your would have sorted the internal table if not sort it by the key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the addition TRANSPORTING NO FIELDS is used, the statement READ TABLE only checks whether the line that is being searched for exists, and fills the system field sy-subrc and sy-tabix. The system can then no longer access the content of the found fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you get sy-subrc eq 4 that record is not available in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;they record in the itab might have a prefix zero's or the value you r passing might have so it would result sy-subrc eq 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:53:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355604#M1037045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T11:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355605#M1037046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;READ TABLE gt_findpartners WITH KEY
z3isptrxtyp = wa_z3isp_inv_conv-z3isptrxtyp
z3ispordno = wa_z3isp_inv_conv-z3ispordno
BINARY SEARCH TRANSPORTING NO FIELDS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once remove binary search and check the sy-subrc value, &lt;/P&gt;&lt;P&gt;if sy-subrc value is 0 then sort the table before read as all said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:55:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355605#M1037046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T11:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: READ Table With Key not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355606#M1037047</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;  Binary Search can be used only once the sorting is performed in the internal table . sort the internal table or remove the binary search while reading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nanda Kishore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 12:07:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-not-working/m-p/4355606#M1037047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-29T12:07:40Z</dc:date>
    </item>
  </channel>
</rss>

