<?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: Problem in getting BOM for components in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-bom-for-components/m-p/2409372#M537302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; First hit against the MAST table with the material number. Then hit against STPO with the internal BOM number to get the components. There are also some function modules that will do this to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: xmast type mast.&lt;/P&gt;&lt;P&gt;data: istpo type table of stpo with header line.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Select Single * from mast&lt;/P&gt;&lt;P&gt;              where matnr = p_matnr.&lt;/P&gt;&lt;P&gt;If sy-subrc = 0.&lt;/P&gt;&lt;P&gt;Write:/ 'This material has a BOM'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;Write:/ 'No BOM found'.&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;write:/ 'Components'.&lt;/P&gt;&lt;P&gt;select * into corresponding fields of table istpo&lt;/P&gt;&lt;P&gt;        from stpo&lt;/P&gt;&lt;P&gt;             where stlnr = xmast-stlnr.&lt;/P&gt;&lt;P&gt;loop at istpo.&lt;/P&gt;&lt;P&gt;write:/ istpo-idnrk.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jul 2007 12:51:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-03T12:51:36Z</dc:date>
    <item>
      <title>Problem in getting BOM for components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-bom-for-components/m-p/2409371#M537301</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;Can anyone help me in developing the logic for the following req.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a SAP table STPO(For BOM).&lt;/P&gt;&lt;P&gt;My selection screen has upto ten componenets number.&lt;/P&gt;&lt;P&gt;I want to display only those BOM which has all the components entered in the screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table XYZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field1		Field2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X		1&lt;/P&gt;&lt;P&gt;X		2&lt;/P&gt;&lt;P&gt;Y		1&lt;/P&gt;&lt;P&gt;Y		2&lt;/P&gt;&lt;P&gt;Y		3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have entered 1 and 2 in the selection screen I need to display X and Y&lt;/P&gt;&lt;P&gt;If I have entered 1,2, and 3 in the selection screen I need to display X &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit Goyal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 12:49:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-bom-for-components/m-p/2409371#M537301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T12:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in getting BOM for components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-bom-for-components/m-p/2409372#M537302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; First hit against the MAST table with the material number. Then hit against STPO with the internal BOM number to get the components. There are also some function modules that will do this to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: xmast type mast.&lt;/P&gt;&lt;P&gt;data: istpo type table of stpo with header line.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Select Single * from mast&lt;/P&gt;&lt;P&gt;              where matnr = p_matnr.&lt;/P&gt;&lt;P&gt;If sy-subrc = 0.&lt;/P&gt;&lt;P&gt;Write:/ 'This material has a BOM'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;Write:/ 'No BOM found'.&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;write:/ 'Components'.&lt;/P&gt;&lt;P&gt;select * into corresponding fields of table istpo&lt;/P&gt;&lt;P&gt;        from stpo&lt;/P&gt;&lt;P&gt;             where stlnr = xmast-stlnr.&lt;/P&gt;&lt;P&gt;loop at istpo.&lt;/P&gt;&lt;P&gt;write:/ istpo-idnrk.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 12:51:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-bom-for-components/m-p/2409372#M537302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T12:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in getting BOM for components</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-bom-for-components/m-p/2409373#M537303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you might try it this way (these are ideas only, not tested code. please use at your own risk)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: sidnrk for stpo-idnrk.&lt;/P&gt;&lt;P&gt;data: compcount type i,&lt;/P&gt;&lt;P&gt;        begin of warea,&lt;/P&gt;&lt;P&gt;           stlty like stpo-stlty,&lt;/P&gt;&lt;P&gt;           stlnr like stpo-stlnr,&lt;/P&gt;&lt;P&gt;           count type i,&lt;/P&gt;&lt;P&gt;        end of warea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table sidnrk lines compcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select stlty stlnr count(*) from stpo into warea&lt;/P&gt;&lt;P&gt;   where idnrk in sidnrk&lt;/P&gt;&lt;P&gt;    group by stlty stlnr     &lt;/P&gt;&lt;P&gt;    having count = compcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this should get you a list of all stlnr's that have all of the components in them. You can then use warea fields to get materials from MAST. this assumes each component is assigned to any BOM only once, etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;again, this is just a thought, based on not having anything in front of me right now SAP-Wise to test it out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 13:04:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-bom-for-components/m-p/2409373#M537303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T13:04:09Z</dc:date>
    </item>
  </channel>
</rss>

