<?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 Problem in read statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251455#M1383780</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Expert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am geting problem in read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looping internal table Gt-ZSD0122t with vbeln and ponr and inside i am reading the one more internal table &lt;/P&gt;&lt;P&gt;GT_LIPS with GT_ZSD0122t-VBELN and GT_ZSD0122t-POSNR.&lt;/P&gt;&lt;P&gt; I have same value for vbeln and posnr in the 2 internal table than also sy-subrc i am getting 8.&lt;/P&gt;&lt;P&gt;So can u please tell me what is problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT GT_ZSD0122T.&lt;/P&gt;&lt;P&gt;READ TABLE GT_LIPS INTO WA_LIPS WITH KEY VBELV = GT_ZSD0122T-VBELN&lt;/P&gt;&lt;P&gt;POSNV = GT_ZSD0122T-POSNR&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;MOVE WA_LIPS-VBELN TO GT_ZSD0122T-VBELN_D.&lt;/P&gt;&lt;P&gt;CLEAR:WA_LIPS-VBELN.&lt;/P&gt;&lt;P&gt;MODIFY GT_ZSD0122T.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the problem if sy-subrc equal to 8?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Nov 2009 07:58:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-13T07:58:06Z</dc:date>
    <item>
      <title>Problem in read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251455#M1383780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Expert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am geting problem in read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looping internal table Gt-ZSD0122t with vbeln and ponr and inside i am reading the one more internal table &lt;/P&gt;&lt;P&gt;GT_LIPS with GT_ZSD0122t-VBELN and GT_ZSD0122t-POSNR.&lt;/P&gt;&lt;P&gt; I have same value for vbeln and posnr in the 2 internal table than also sy-subrc i am getting 8.&lt;/P&gt;&lt;P&gt;So can u please tell me what is problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT GT_ZSD0122T.&lt;/P&gt;&lt;P&gt;READ TABLE GT_LIPS INTO WA_LIPS WITH KEY VBELV = GT_ZSD0122T-VBELN&lt;/P&gt;&lt;P&gt;POSNV = GT_ZSD0122T-POSNR&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;MOVE WA_LIPS-VBELN TO GT_ZSD0122T-VBELN_D.&lt;/P&gt;&lt;P&gt;CLEAR:WA_LIPS-VBELN.&lt;/P&gt;&lt;P&gt;MODIFY GT_ZSD0122T.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the problem if sy-subrc equal to 8?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2009 07:58:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251455#M1383780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-13T07:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251456#M1383781</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;Before the loop sort the internal table and check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort gt_lips by vbelv posnv.   "add this

LOOP AT GT_ZSD0122T.
READ TABLE GT_LIPS INTO WA_LIPS WITH KEY VBELV = GT_ZSD0122T-VBELN
POSNV = GT_ZSD0122T-POSNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE WA_LIPS-VBELN TO GT_ZSD0122T-VBELN_D.
CLEAR:WA_LIPS-VBELN.
MODIFY GT_ZSD0122T.
ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2009 08:01:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251456#M1383781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-13T08:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251457#M1383782</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 u sort the internal table  GT_LIPS based on vbelv and posnv .&lt;/P&gt;&lt;P&gt;then u can perform the binary search. because for binary serch , u should sort the table based on key field (ie u r using in read statement)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2009 08:03:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251457#M1383782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-13T08:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251458#M1383783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi shridarudupi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before using the BINARY SEARCH option in read statement you should sort the internal.&lt;/P&gt;&lt;P&gt;This is the primary requirement for using Binary Search.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2009 08:43:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251458#M1383783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-13T08:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251459#M1383784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Always sort the internal table before using Binary search&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOR GT_ZSD0122T VBELV POSNV ASCENDING.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2009 08:51:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251459#M1383784</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-13T08:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251460#M1383785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks...problem solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2009 00:00:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/6251460#M1383785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-15T00:00:07Z</dc:date>
    </item>
  </channel>
</rss>

