<?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: select? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739555#M636379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to create the Internal tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select MATNR MTART &amp;lt;fields which you likw&amp;gt; into talbe ITAB1 from MARA&lt;/P&gt;&lt;P&gt;           where MATNR = P_MATNR and&lt;/P&gt;&lt;P&gt;                    MTART = P_MTART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF not ITAB[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR MTART WERKS &amp;lt;fields which you want &amp;gt; into table IT_MARC&lt;/P&gt;&lt;P&gt;             from MARC for all entries in ITAB where&lt;/P&gt;&lt;P&gt;             MATNR = ITAB-MATNR and&lt;/P&gt;&lt;P&gt;            WERKS = P_WERKS&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Sep 2007 13:23:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-12T13:23:48Z</dc:date>
    <item>
      <title>select?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739552#M636376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a parameters like&lt;/P&gt;&lt;P&gt;Matnr&lt;/P&gt;&lt;P&gt;Mtart&lt;/P&gt;&lt;P&gt;Plant on my selection screen&amp;#133;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to fetch list of materials from MARA based on input selection.&lt;/P&gt;&lt;P&gt;But there is no PLANT field available in MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I write the select statement&amp;#133;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr&lt;/P&gt;&lt;P&gt;         spart&lt;/P&gt;&lt;P&gt;         mtart&lt;/P&gt;&lt;P&gt;         from mara into table int_mara&lt;/P&gt;&lt;P&gt;         where matnr in p_matnr and&lt;/P&gt;&lt;P&gt;               spart in p_spart and&lt;/P&gt;&lt;P&gt;               mtart in p_mtart.&lt;/P&gt;&lt;P&gt; Instead of this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vkr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2007 13:12:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739552#M636376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-12T13:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: select?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739553#M636377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;gt_main table contains the relevant fields from mara and marc also.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT * 
  INTO CORRESPONDING FIELDS OF TABLE gt_main
  FROM mara
  INNER JOIN marc ON mara~matnr = marc~matnr
  WHERE mara~matnr IN p_matnr AND
  marc~werks IN p_werks AND
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamás&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Tamás Nyisztor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2007 13:16:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739553#M636377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-12T13:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: select?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739554#M636378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;u can use joins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select p1~matnr&lt;/P&gt;&lt;P&gt;          p1~mtart&lt;/P&gt;&lt;P&gt;          p2~werks&lt;/P&gt;&lt;P&gt; into table itab &lt;/P&gt;&lt;P&gt;from ( mara as p1&lt;/P&gt;&lt;P&gt;  join marc as p2 on p1&lt;SUB&gt;matnr = p2&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;where matnr in s_matnr and&lt;/P&gt;&lt;P&gt;        matart eq p_matart and&lt;/P&gt;&lt;P&gt;         werks eq p_werks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2007 13:18:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739554#M636378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-12T13:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: select?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739555#M636379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to create the Internal tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select MATNR MTART &amp;lt;fields which you likw&amp;gt; into talbe ITAB1 from MARA&lt;/P&gt;&lt;P&gt;           where MATNR = P_MATNR and&lt;/P&gt;&lt;P&gt;                    MTART = P_MTART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF not ITAB[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR MTART WERKS &amp;lt;fields which you want &amp;gt; into table IT_MARC&lt;/P&gt;&lt;P&gt;             from MARC for all entries in ITAB where&lt;/P&gt;&lt;P&gt;             MATNR = ITAB-MATNR and&lt;/P&gt;&lt;P&gt;            WERKS = P_WERKS&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2007 13:23:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739555#M636379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-12T13:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: select?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739556#M636380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if there is no plant in MARA table than you cant able to access any plant data from that table,yes check with y our functional consultant whether there is any other table which contain similar plant so that you can use that table and access the plant data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your select statement is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2007 13:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2739556#M636380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-12T13:26:46Z</dc:date>
    </item>
  </channel>
</rss>

