<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511764#M844758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;Read table it_kunnr into work area with key name = 'XYZ'&lt;/P&gt;&lt;P&gt;                                                               land1 = 'ABC'.&lt;/P&gt;&lt;P&gt;check sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 10, 2008 6:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Mar 2008 06:49:19 GMT</pubDate>
    <dc:creator>Sandeep_Panghal</dc:creator>
    <dc:date>2008-03-10T06:49:19Z</dc:date>
    <item>
      <title>read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511761#M844755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;  i want to read kunnr from my internal table where name1 = 'vicky' , land1 = 'india'. I want to use the read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;     sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 06:45:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511761#M844755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T06:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511762#M844756</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 table internal_table into wa_itab &lt;/P&gt;&lt;P&gt;where name = 'VICKY' and land1 = 'INDIA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 10, 2008 6:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 06:48:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511762#M844756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T06:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511763#M844757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read itab into wa_itab with key name1 = 'vicky' &lt;/P&gt;&lt;P&gt;                                              land1 = 'india'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_kunnar = 2a_itab-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 06:48:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511763#M844757</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2008-03-10T06:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511764#M844758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;Read table it_kunnr into work area with key name = 'XYZ'&lt;/P&gt;&lt;P&gt;                                                               land1 = 'ABC'.&lt;/P&gt;&lt;P&gt;check sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 10, 2008 6:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 06:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511764#M844758</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2008-03-10T06:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511765#M844759</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 for any Internal Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reads a line of an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;itab&amp;gt;  FROM &amp;lt;wa&amp;gt;&lt;/P&gt;&lt;P&gt;                  |WITH TABLE KEY &amp;lt;k1&amp;gt; = &amp;lt;f1&amp;gt;... &amp;lt;kn&amp;gt; = &amp;lt;fn&amp;gt; &lt;/P&gt;&lt;P&gt;                  |WITH KEY = &amp;lt;f&amp;gt;&lt;/P&gt;&lt;P&gt;                  |WITH KEY &amp;lt;k1&amp;gt; = &amp;lt;f1&amp;gt;... &amp;lt;kn&amp;gt; = &amp;lt;fn&amp;gt; &lt;/P&gt;&lt;P&gt;      INTO &amp;lt;wa&amp;gt; [COMPARING &amp;lt;f1&amp;gt; &amp;lt;f2&amp;gt;... |ALL FIELDS]&lt;/P&gt;&lt;P&gt;                [TRANSPORTING &amp;lt;f1&amp;gt; &amp;lt;f2&amp;gt;... |ALL FIELDS|NO FIELDS]&lt;/P&gt;&lt;P&gt;     |ASSIGNING &amp;lt;FS&amp;gt;&lt;/P&gt;&lt;P&gt;     |REFERENCE INTO &amp;lt;dref&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement reads either the line of the internal table with the same key as specified in the work area &amp;lt;wa&amp;gt;, the line with the key specified in the TABLE KEY addition, the line that corresponds fully to &amp;lt;f&amp;gt;, or the one corresponding to the freely-defined key in the KEY addition. The contents of the line are either written to the work area &amp;lt;wa&amp;gt;, or the line is assigned to the field symbol &amp;lt;FS&amp;gt;. If you assign the line to a work area, you can compare field contents and specify the fields that you want to transport.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ for Index Tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reads a line of an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&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;   INTO &amp;lt;wa&amp;gt;... &lt;/P&gt;&lt;P&gt;                              | ASSIGNING &amp;lt;FS&amp;gt;&lt;/P&gt;&lt;P&gt;                              | REFERENCE INTO &amp;lt;dref&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The line with index 7 is read. The result is specified as with any internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 06:50:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511765#M844759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T06:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511766#M844760</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;u can u the stmt READ TABLE itab WITH KEY k1 = v1 ... kn = vn .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 06:51:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511766#M844760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T06:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511767#M844761</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;you can use this codes too :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ITAB BY NAME1 LAND1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB INTO WA_ITAB WITH KEY NAME1 = 'VICKY'&lt;/P&gt;&lt;P&gt;				      LAND1 = 'INDIA' BINARY SEARCH. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM YOUR_STEPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 06:55:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511767#M844761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T06:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511768#M844762</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;Use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort it_tab by name1 land1.&lt;/P&gt;&lt;P&gt;Read table it_tab into wa_tab with key name1 = 'Vicky'&lt;/P&gt;&lt;P&gt;                                                        land1 = 'India'&lt;/P&gt;&lt;P&gt;                                                        binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;     l_kunnr = wa_itab-kunnr.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it will help you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Parul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 07:04:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511768#M844762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T07:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511769#M844763</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;You can do as below using read statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

sort itaby by name land1.

read table itab with key name1 = 'vicky' 
                                    land1 = 'india'.

if sy-subrc eq 0.
"Your necessary code
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 07:13:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511769#M844763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T07:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511770#M844764</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;decalre an internal table and an explicit work area for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it.&lt;/P&gt;&lt;P&gt;ReaD TABEL (INTERNAL TABLE NAME) INTO wa with key kunnr  = 'VICKY' and land1 = 'INDIA'.&lt;/P&gt;&lt;P&gt;append wa.&lt;/P&gt;&lt;P&gt;modify itab from wa.&lt;/P&gt;&lt;P&gt;clear wa.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : wa-kunnr, wa-land1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2008 08:30:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511770#M844764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-10T08:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511771#M844765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Read table itab with key name1 = 'vicky' and land1 = 'india'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank u,&lt;/P&gt;&lt;P&gt;Manjula Devi.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2008 12:21:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511771#M844765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-10T12:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511772#M844766</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 table itab with key name1 = 'vicky' and land1 = 'india'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Soumya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2008 12:34:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511772#M844766</guid>
      <dc:creator>soumya_jose3</dc:creator>
      <dc:date>2008-04-10T12:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: read table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511773#M844767</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;If your internal table has more than one Record with values:&lt;/P&gt;&lt;P&gt;Name = Vicky and Land = India.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read statement will fetch the First index with above condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to read a particular record with above combination , you should modify ur Read statement with key condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else it will b OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2008 00:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table/m-p/3511773#M844767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-11T00:56:22Z</dc:date>
    </item>
  </channel>
</rss>

