<?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 table issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876223#M675140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Other folks have coverd the need to sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another issue can occur if the value you are using for kunnr is not properly formatted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have to call &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input  = i_output-kunnr
    IMPORTING
      output = i_output-kunnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to ensure kunnr is properly formatted before doing the read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As noted above, I think you need to post more of your code to put things in context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Sep 2007 21:25:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-28T21:25:18Z</dc:date>
    <item>
      <title>read table issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876216#M675133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue with 'READ TABLE' statement in a program. I am reading an internal table "i_output". The issue here is, it is working fine with some &lt;/P&gt;&lt;P&gt;customers(kunnr) but not for others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    clear i_output.&lt;/P&gt;&lt;P&gt;    read line sy-index.&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;&lt;/P&gt;&lt;P&gt;    check not i_output is initial.&lt;/P&gt;&lt;P&gt;    read table i_output with key kunnr = i_output-kunnr&lt;/P&gt;&lt;P&gt;                                             vbeln = i_output-vbeln&lt;/P&gt;&lt;P&gt;                                             posnr = i_output-posnr binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Here in 'sy-subrc' it's returning '0' for some customers and sometimes '8'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody please let me know what is wrong with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 20:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876216#M675133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T20:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: read table issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876217#M675134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SORT Table i_output first...since you are using binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT i_output BY KUNNR VBELN POSNR.&lt;/P&gt;&lt;P&gt;read table i_output with key kunnr = i_output-kunnr&lt;/P&gt;&lt;P&gt;vbeln = i_output-vbeln&lt;/P&gt;&lt;P&gt;posnr = i_output-posnr binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Sri Tayi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 20:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876217#M675134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T20:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: read table issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876218#M675135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;SORTing of Internal is a must to use the BINARY search in read statement&lt;/P&gt;&lt;P&gt;So first SORT ITAB by KUNNR VBELN POSNR first&lt;/P&gt;&lt;P&gt;then use the READ statement as you wrote&lt;/P&gt;&lt;P&gt;then it will fetch the right records always&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 20:50:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876218#M675135</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T20:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: read table issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876219#M675136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_output by kunnr vbeln posnr.&lt;/P&gt;&lt;P&gt;read table i_output with key kunnr = i_output-kunnr&lt;/P&gt;&lt;P&gt;vbeln = i_output-vbeln&lt;/P&gt;&lt;P&gt;posnr = i_output-posnr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is something strange... how are you reading the same table with same conditions!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SKJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 20:57:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876219#M675136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T20:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: read table issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876220#M675137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have already sorted the internal table. It's not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 21:02:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876220#M675137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T21:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: read table issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876221#M675138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Paste your code completely then it is easy to solve &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 21:03:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876221#M675138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T21:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: read table issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876222#M675139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all. It works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;null&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 21:20:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876222#M675139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T21:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: read table issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876223#M675140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Other folks have coverd the need to sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another issue can occur if the value you are using for kunnr is not properly formatted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have to call &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input  = i_output-kunnr
    IMPORTING
      output = i_output-kunnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to ensure kunnr is properly formatted before doing the read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As noted above, I think you need to post more of your code to put things in context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 21:25:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-issue/m-p/2876223#M675140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T21:25:18Z</dc:date>
    </item>
  </channel>
</rss>

