<?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 how to fetch data from single database table using 2 internal tables. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461435#M1057304</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am a new user of ABAP and also SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need a help.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to fetch data from one database table based on primary keys of 2 internal tables.  how to put in where clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2008 08:43:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-15T08:43:40Z</dc:date>
    <item>
      <title>how to fetch data from single database table using 2 internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461435#M1057304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am a new user of ABAP and also SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need a help.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to fetch data from one database table based on primary keys of 2 internal tables.  how to put in where clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 08:43:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461435#M1057304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T08:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to fetch data from single database table using 2 internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461436#M1057305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer to following code ..i hope it will help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT matnr                         " Material Number
    FROM mara
    INTO TABLE i_mara
   WHERE matnr IN s_matnr.


  IF i_mara[] IS NOT INITIAL.
    SELECT matnr                       " Material Number
           werks                       " Plants
           prctr                       " Profit Center
      FROM marc
      INTO TABLE i_marc
       FOR ALL ENTRIES IN i_mara
     WHERE matnr = i_mara-matnr
       AND werks IN s_werks.

  ENDIF.                               " IF i_mara[] IS NOT INITIAL

  i_output = i_marc.

  IF i_marc[] IS NOT INITIAL.

    SELECT matnr                       " Material Number
           werks                       " Plants
           lgort                       " Storage Location
      FROM mard
      INTO TABLE i_mard
       FOR ALL ENTRIES IN i_marc
     WHERE matnr EQ i_marc-matnr
       AND werks EQ i_marc-werks
       AND lgort IN s_lgort.

  ENDIF.                               " IF i_mara[] IS NOT INITIAL&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 08:47:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461436#M1057305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T08:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to fetch data from single database table using 2 internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461437#M1057306</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;&amp;gt; primary keys of 2 internal tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correst your post, because internal table fields never contains primary key and Non-primary key catogories!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 08:47:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461437#M1057306</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-09-15T08:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to fetch data from single database table using 2 internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461438#M1057307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer &lt;/P&gt;&lt;P&gt;[http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3a1f358411d1829f0000e829fbfe/content.htm]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 08:49:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461438#M1057307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T08:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to fetch data from single database table using 2 internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461439#M1057308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Thanks for your message.  As per your coding, it is fetching from 2 different tables, but my requirement is to fetch from one table based on 1 field from one internal table and 1 field from another internal table.  Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 08:52:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461439#M1057308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T08:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to fetch data from single database table using 2 internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461440#M1057309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select * from &amp;lt;table name&amp;gt; where &amp;lt;field name1&amp;gt; = &amp;lt;itab1-field&amp;gt; and &amp;lt;field name2&amp;gt; = &amp;lt;itab2-field&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 08:57:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461440#M1057309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T08:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to fetch data from single database table using 2 internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461441#M1057310</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 &lt;STRONG&gt;FOR ALL ENTRIES&lt;/STRONG&gt; keyword&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Examples&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;select * into table it_result from mara&lt;/P&gt;&lt;P&gt;                                       for all entries in &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;                                       where matnr eq &amp;lt;itab&amp;gt;-fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into table it_result1 from mara&lt;/P&gt;&lt;P&gt;                                       for all entries in &amp;lt;itab2&amp;gt;&lt;/P&gt;&lt;P&gt;                                       where matnr eq &amp;lt;itab2&amp;gt;-fieldname.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 09:02:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461441#M1057310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T09:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to fetch data from single database table using 2 internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461442#M1057311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much.  I could able to fetch.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 09:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-fetch-data-from-single-database-table-using-2-internal-tables/m-p/4461442#M1057311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T09:04:27Z</dc:date>
    </item>
  </channel>
</rss>

