<?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 the internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987206#M952548</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;&lt;/P&gt;&lt;P&gt;Sort it_bsak1 by lifnr ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_disb_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_bsak1 WITH KEY&lt;/P&gt;&lt;P&gt;lifnr = it_disb_output-fi_lifnr BINARY SEARCH.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;if  it_bsak1-xragl NE 'X'.&lt;/P&gt;&lt;P&gt;____________&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jun 2008 03:41:22 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2008-06-23T03:41:22Z</dc:date>
    <item>
      <title>Reading the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987199#M952541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abapers ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  I have an internal table it_bsak .I have to read the internal table with the condition xragl field in it_bsak table should not be equal to 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE it_bsak1 WITH KEY&lt;/P&gt;&lt;P&gt;            lifnr = it_disb_output-fi_lifnr  &lt;/P&gt;&lt;P&gt;           xragl  NE 'X' &lt;/P&gt;&lt;P&gt;        BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement is not working .&lt;/P&gt;&lt;P&gt;What is the correct statement to read from it_bsak table condition as xragl field not equal to 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help .&lt;/P&gt;&lt;P&gt;Jaga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 11:34:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987199#M952541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T11:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987200#M952542</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;READ accepts only equality condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so  use loop condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop at it_bsak where lifnr = it_disb_output-fi_lifnr 
                                   and xragl NE 'X' 

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 11:35:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987200#M952542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T11:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987201#M952543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at  it_bsak1 where  lifnr = it_disb_output-fi_lifnr &lt;/P&gt;&lt;P&gt;and xragl NE 'X' .&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside the loop u can make use of it_bsak1 for ur requirement...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 11:39:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987201#M952543</guid>
      <dc:creator>former_member195383</dc:creator>
      <dc:date>2008-06-21T11:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987202#M952544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before loop use the &lt;STRONG&gt;sort table&lt;/STRONG&gt; by the field used in the read statement ...and check&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 11:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987202#M952544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T11:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987203#M952545</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;It appears you want to "code" this READ because you are already within a LOOP on table it_disb_output, hence trying to avoid loop within loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this purpose, create another internal table of identical structure as it_bsak1 say it_bsak1_tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then before loop at it_disb_output do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REFRESH it_bsak1_tmp.
APPEND LINES OF it_bsak1 TO it_bsak1_tmp.
DELETE it_bsak1_tmp WHERE xragl EQ 'X'.
SORT it_bsak1_tmp BY LIFNR.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now within your loop, you can &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_bsak1_tmp WITH KEY lifnr = it_disb_output-fi_lifnr . because, the new table it_bsak1_tmp does not have any entries with xragl as 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 12:39:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987203#M952545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T12:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987204#M952546</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;Which ever statement you use( Read or Loop ) depends on the records you have in the internal table. Moreover when you are using binary search to the read statement always " SORT the internal table with the fields given in the where condition ", otherwise the binary search will work in a wrong way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_tab by field1 field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_tab into is_tab with key field1 = 'value'&lt;/P&gt;&lt;P&gt;                                                     field2 = 'value'&lt;/P&gt;&lt;P&gt;                                                     binary search.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jun 2008 11:47:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987204#M952546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-22T11:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987205#M952547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagdish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"NE" Not Equal Operator doesn't work in Read Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of doing this type use the Loop statement Logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at it_bsak1  where lifnr = it_disb_output-fi_lifnr 
                                    xragl NE 'X' .

    &amp;lt;Play with your data&amp;gt;  

EndLoop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;*******************&lt;STRONG&gt;Reward Point if helpful&lt;/STRONG&gt;******************&amp;amp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jun 2008 16:09:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987205#M952547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-22T16:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987206#M952548</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;&lt;/P&gt;&lt;P&gt;Sort it_bsak1 by lifnr ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_disb_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_bsak1 WITH KEY&lt;/P&gt;&lt;P&gt;lifnr = it_disb_output-fi_lifnr BINARY SEARCH.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;if  it_bsak1-xragl NE 'X'.&lt;/P&gt;&lt;P&gt;____________&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 03:41:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987206#M952548</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2008-06-23T03:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987207#M952549</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;&lt;/P&gt;&lt;P&gt;First you should not use EQ, NE  etc in read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort it_bsak1 by lifnr ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_bsak1 WITH KEY lifnr = it_disb_output-fi_lifnr &lt;/P&gt;&lt;P&gt;                                          *NOT xragl = 'X' *&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort it_bsak1 by lifnr ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_bsak1 WITH KEY lifnr = it_disb_output-fi_lifnr &lt;/P&gt;&lt;P&gt;                                          &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;xragl &amp;lt;&amp;gt; 'X' *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 03:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-the-internal-table/m-p/3987207#M952549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T03:47:30Z</dc:date>
    </item>
  </channel>
</rss>

