<?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 material Plant. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757308#M1115687</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a SELECT on MAST table as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr werks&lt;/P&gt;&lt;P&gt;FROM mast INTO TABLE i1_mast where matnr IN s_matnr&lt;/P&gt;&lt;P&gt;AND werks in s_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_marc.&lt;/P&gt;&lt;P&gt;read table it_mast with key matnr = it_marc-matnr and&lt;/P&gt;&lt;P&gt;                                        werks = it_marc-werks.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;*record exists in MAST table.&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;*record does not exist in MAST table.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2008 14:41:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-11T14:41:22Z</dc:date>
    <item>
      <title>Select material Plant.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757304#M1115683</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;SELECT matnr werks&lt;/P&gt;&lt;P&gt;         FROM marc    INTO TABLE i1_marc where matnr IN s_matnr&lt;/P&gt;&lt;P&gt;AND werks in s_werks AND mmsta = '10'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On doing this all the plant and material that is been fetched,&lt;/P&gt;&lt;P&gt;I need to determine if table MAST (Material to BOM Link) has an existing record for the same, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one help me in this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks:&lt;/P&gt;&lt;P&gt;Debrup.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 14:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757304#M1115683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T14:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select material Plant.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757305#M1115684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do a JOIN of tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 14:36:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757305#M1115684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T14:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select material Plant.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757306#M1115685</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;Please convert this Select into a Select based of Inner Join between MARD &amp;amp; MAST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT marc&lt;SUB&gt;matnr marc&lt;/SUB&gt;werks&lt;/P&gt;&lt;P&gt;INTO TABLE i1_marc&lt;/P&gt;&lt;P&gt;FROM marc inner join MAST&lt;/P&gt;&lt;P&gt;on marc-matnr = MAST-MAtnr and&lt;/P&gt;&lt;P&gt;    marc-werks = MAST-werks&lt;/P&gt;&lt;P&gt; where marc~matnr IN s_matnr&lt;/P&gt;&lt;P&gt;AND marc&lt;SUB&gt;werks in s_werks AND marc&lt;/SUB&gt;mmsta = '10'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 14:36:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757306#M1115685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T14:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select material Plant.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757307#M1115686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Debrup,&lt;/P&gt;&lt;P&gt;Then what you need to do it first fetch all the plants which are present in the table mast.&lt;/P&gt;&lt;P&gt;And then put a query in the marc table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT * FROM MAST INTO IT_MAST 
  WHERE WERKS = S_WERKS..
IF NOT MAST[] IS INITIAL.
SELECT matnr werks
FROM marc INTO TABLE i1_marc 
FOR ALL ENTRIES IN 
where matnr IN s_matnr
AND werks = IT_MAST
 AND mmsta = '10'.
ENDIF
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 14:37:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757307#M1115686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T14:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select material Plant.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757308#M1115687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a SELECT on MAST table as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr werks&lt;/P&gt;&lt;P&gt;FROM mast INTO TABLE i1_mast where matnr IN s_matnr&lt;/P&gt;&lt;P&gt;AND werks in s_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_marc.&lt;/P&gt;&lt;P&gt;read table it_mast with key matnr = it_marc-matnr and&lt;/P&gt;&lt;P&gt;                                        werks = it_marc-werks.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;*record exists in MAST table.&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;*record does not exist in MAST table.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 14:41:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757308#M1115687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T14:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select material Plant.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757309#M1115688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why dont you do a select of MAST directly, you already have the material and the plant in that table. further you can join it with MARC to check mmsta.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As follows :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

select * into corresponding fields of table table it_mast
from mast as m
inner join marc on as c
on m~matnr = c~matnr
and m~werks = m~werks
where m~matnr in s_matnr
and    m~werks in s_werks
and    c~mmsta = '10'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 14:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-material-plant/m-p/4757309#M1115688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T14:46:21Z</dc:date>
    </item>
  </channel>
</rss>

