<?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 single entry from an internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817062#M349714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if its only 1 record&lt;/P&gt;&lt;P&gt;read table i_tab into wa_tab index 1. ? not too sure on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if you have condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table i_tab into wa_tab WITH key FIELD = SEARCH_TERM&lt;/P&gt;&lt;P&gt;binary serach&lt;/P&gt;&lt;P&gt;transporting &amp;lt;FIELD&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that &amp;lt;field&amp;gt; is the fields that you want to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Jan 2007 05:18:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-31T05:18:03Z</dc:date>
    <item>
      <title>Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817060#M349712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi abappers,&lt;/P&gt;&lt;P&gt;instead of select sibgle i want to read a single value from an internal tabel.&lt;/P&gt;&lt;P&gt;how can i use this....&lt;/P&gt;&lt;P&gt;provide the syntax.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:12:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817060#M349712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817061#M349713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try using &amp;lt;b&amp;gt;read table&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:16:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817061#M349713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817062#M349714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if its only 1 record&lt;/P&gt;&lt;P&gt;read table i_tab into wa_tab index 1. ? not too sure on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if you have condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table i_tab into wa_tab WITH key FIELD = SEARCH_TERM&lt;/P&gt;&lt;P&gt;binary serach&lt;/P&gt;&lt;P&gt;transporting &amp;lt;FIELD&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that &amp;lt;field&amp;gt; is the fields that you want to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:18:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817062#M349714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817063#M349715</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;Either use READ table&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;loop at itab where condition  and move the value to a variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:19:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817063#M349715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817064#M349716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt; There are two ways using READ TABLE..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE itab into wa_area INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE itab into wa_area INDEX n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE itab into wa_area WITH KEY filed1 = value1. (Use key).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:20:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817064#M349716</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-01-31T05:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817065#M349717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use READ statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE itab INTO wa_itab WITH key &amp;lt;FIELD&amp;gt; = &amp;lt;value&amp;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;READ TABLE itab INTO wa_itab INDEX &amp;lt;num&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:20:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817065#M349717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817066#M349718</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;To read a single entry from a table you ahve to use READ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;READ TABLE itab WITH INDEX 1. 

READ TABLE itab WITH KEY matnr = '10000010'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After read u have to use a sy-subrc check and proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to read based on some values from a table then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT itab.
CLEAR itab2.
READ TABLE itab2 WITH KEY matnr = itab-matnr.
IF sy-subrc = 0.
...........
ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves ur query, please close the thread by rewarding points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:24:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817066#M349718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817067#M349719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi mansi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:31:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817067#M349719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817068#M349720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mansi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use READ TABLE for reading a single entry.&lt;/P&gt;&lt;P&gt;You have your data in the internal table so just read the table inside the loop using index or the key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;itab&amp;gt; WITH KEY &amp;lt;k1&amp;gt; = &amp;lt;f1&amp;gt;... &amp;lt;kn&amp;gt; = &amp;lt;fn&amp;gt; &amp;lt;result&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;itab&amp;gt; INDEX &amp;lt;idx&amp;gt; &amp;lt;result&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system reads the line with the index &amp;lt;idx&amp;gt; from the table &amp;lt;itab&amp;gt;. &lt;/P&gt;&lt;P&gt;The &amp;lt;result&amp;gt; part can specify a further processing option for the line that is retrieved.&lt;/P&gt;&lt;P&gt;If an entry with the specified index was found, the system field SY-SUBRC is set to 0 and SY-TABIX contains the index of that line. Otherwise, SY-SUBRC is set to a value other than 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Papiya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 06:08:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817068#M349720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T06:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817069#M349721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Select Single is use d to read a single first matching line from the database table and not from the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To read a line from the internal table you have to use the READ TABLE itab with KEY fld1 = val1 BINARY SEARCH. &lt;/P&gt;&lt;P&gt;Addition of binary search improves performance, but the table should be sorted on that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 06:23:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817069#M349721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T06:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Read single entry from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817070#M349722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mansi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use   &amp;lt;b&amp;gt;READ TABLE itab into wa_area INDEX n&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward point if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 06:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-single-entry-from-an-internal-table/m-p/1817070#M349722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T06:33:25Z</dc:date>
    </item>
  </channel>
</rss>

