<?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 Norms for each BOM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271457#M1216954</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;Just like what they said you can go to MAST, MARA and STPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MARA - to check the type of your material (FG,SEMi-FG, raw, etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAST- to check the BOM link for your material&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STPO - to check the components of of your material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it goes like MATNR(FG) pass to MAST-MATNR to get MAST-STLNR then MAST-STLNR pass to STPO-STLNR to get STPO-IDNRK . then pass to MAST-MATNR to get MAST-STLNR then MAST-STLNR pass to STPO-STLNR to get STPO-IDNRK ....so on and so forth. do this searching until you cannot retreive a record.it only means that you got all raw materials(most raw materials dont have components)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&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;Leonard Chomi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2009 02:11:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-18T02:11:07Z</dc:date>
    <item>
      <title>Problem in getting Norms for each BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271452#M1216949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing a report for stock with subcontractors and I am facing a problem in getting the accurate&lt;/P&gt;&lt;P&gt;Norms &lt;STRONG&gt;(STPO~MENGE)&lt;/STRONG&gt; against the &lt;STRONG&gt;BOM (STPO~STLNR)&lt;/STRONG&gt;  for each &lt;STRONG&gt;EBELN&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. &lt;STRONG&gt;Finished Goods&lt;/STRONG&gt; - &lt;STRONG&gt;( MSEG~MATNR)&lt;/STRONG&gt;  or &lt;STRONG&gt;(EKPO~MATNR)&lt;/STRONG&gt; but mseg-matnr is more prefered as  my output  is  based on the  &lt;STRONG&gt;mkpf-budat&lt;/STRONG&gt; , &lt;STRONG&gt;WHERE BWART IN ('101','102')&lt;/STRONG&gt;  then &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MSEG~EBELN&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF &lt;STRONG&gt;EKPO-PSTYP&lt;/STRONG&gt;  ne  ' 3 '   delete &lt;STRONG&gt;Finished goods&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I take raw materials for finished goods and BOM for each rawmaterials.&lt;/P&gt;&lt;P&gt;2. &lt;STRONG&gt;Raw materials&lt;/STRONG&gt; -  select &lt;STRONG&gt;(RESB&lt;SUB&gt;MATNR, RESB&lt;/SUB&gt;STLNR, RESB&lt;SUB&gt;STLKN, RESB&lt;/SUB&gt;STPOZ)&lt;/STRONG&gt;  &lt;STRONG&gt;where resb-baugr = mseg-matnr and ebeln = mseg-ebeln&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am facing problem in getting &lt;STRONG&gt;NORMS&lt;/STRONG&gt; against each &lt;STRONG&gt;BOM&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. &lt;STRONG&gt;Norms&lt;/STRONG&gt; - * select STPO&lt;SUB&gt;MENGE where STLNR = RESB&lt;/SUB&gt;STLNR , IDNRK = RESB~MATNR,&lt;/P&gt;&lt;P&gt;                    STPOZ = RESB~STPOZ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am not getting the correct Norms for each &lt;STRONG&gt;EBELN&lt;/STRONG&gt;, please advice if my logic is wrong or if my&lt;/P&gt;&lt;P&gt;tables are wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Karthik.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Karthik R on Mar 13, 2009 10:32 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Karthik R on Mar 13, 2009 10:32 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Karthik R on Mar 13, 2009 10:33 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 05:01:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271452#M1216949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T05:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in getting Norms for each BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271453#M1216950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;You try this one, which I already tried and working fine for me when i developed a custom's enquiry report,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is a peice of code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************************************************************&lt;/P&gt;&lt;P&gt;  SELECT  A&lt;SUB&gt;BUDAT A&lt;/SUB&gt;XBLNR B&lt;SUB&gt;MBLNR B&lt;/SUB&gt;ZEILE&lt;/P&gt;&lt;P&gt;          B&lt;SUB&gt;BWART B&lt;/SUB&gt;EBELN B&lt;SUB&gt;MENGE B&lt;/SUB&gt;DMBTR B~KUNNR&lt;/P&gt;&lt;P&gt;          INTO CORRESPONDING FIELDS OF TABLE IT_FINAL&lt;/P&gt;&lt;P&gt;          FROM MKPF AS A INNER JOIN MSEG AS B ON A&lt;SUB&gt;MBLNR = B&lt;/SUB&gt;MBLNR AND&lt;/P&gt;&lt;P&gt;                                                 A&lt;SUB&gt;MJAHR = B&lt;/SUB&gt;MJAHR&lt;/P&gt;&lt;P&gt;          WHERE A~BUDAT IN S_BUDAT AND&lt;/P&gt;&lt;P&gt;                B~MATNR = WA_IMAT-MATNR AND&lt;/P&gt;&lt;P&gt;                B~WERKS IN S_WERKS .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT IT_FINAL IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT MATNR WERKS STLAN STLNR STLAL&lt;/P&gt;&lt;P&gt;           FROM MAST INTO TABLE IT_MAST&lt;/P&gt;&lt;P&gt;           WHERE MATNR = WA_IMAT-MATNR AND&lt;/P&gt;&lt;P&gt;                 WERKS IN S_WERKS AND&lt;/P&gt;&lt;P&gt;                 STLAN = '1'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT IT_MAST IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT STLTY STLNR STLAL DATUV BMEIN BMENG&lt;/P&gt;&lt;P&gt;           FROM STKO INTO TABLE IT_STKO&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN IT_MAST&lt;/P&gt;&lt;P&gt;           WHERE STLNR = IT_MAST-STLNR AND&lt;/P&gt;&lt;P&gt;                 STLAL = IT_MAST-STLAL AND ( STLTY = 'D' OR STLTY = 'E' OR STLTY = 'K' OR&lt;/P&gt;&lt;P&gt;                                             STLTY = 'M' OR STLTY = 'S' OR STLTY = 'T' OR STLTY = 'P' ).&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT IT_STKO IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT STLNR DATUV IDNRK POSNR MEINS MENGE&lt;/P&gt;&lt;P&gt;           FROM STPO INTO TABLE IT_STPO&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN IT_STKO&lt;/P&gt;&lt;P&gt;           WHERE STLNR = IT_STKO-STLNR AND STLTY = IT_STKO-STLTY.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT IT_STPO IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT MATNR MAKTX&lt;/P&gt;&lt;P&gt;           FROM MAKT INTO TABLE IT_MAKT&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN IT_STPO&lt;/P&gt;&lt;P&gt;           WHERE MATNR = IT_STPO-IDNRK AND&lt;/P&gt;&lt;P&gt;                 SPRAS = 'EN'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT IT_STKO INTO WA_STKO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    " Own Custom Logic, If Item Quantity is 500 KG, how to calculate per KG, Simple divide by the same Qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF WA_STKO-BMEIN = 'KG'.&lt;/P&gt;&lt;P&gt;      LOOP AT IT_STPO INTO WA_STPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WA_STPO-RATIO = WA_STPO-MENGE / WA_STKO-BMENG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        MODIFY IT_STPO FROM WA_STPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CLEAR : WA_STPO.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR : WA_STKO.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT IT_STPO INTO WA_STPO.&lt;/P&gt;&lt;P&gt;    LOOP AT IT_MAKT INTO WA_MAKT.&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING WA_MAKT TO WA_STPO.&lt;/P&gt;&lt;P&gt;      DELETE TABLE IT_MAKT FROM WA_MAKT.&lt;/P&gt;&lt;P&gt;      CLEAR : WA_MAKT.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODIFY IT_STPO FROM WA_STPO.&lt;/P&gt;&lt;P&gt;    CLEAR : WA_STPO.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT IT_FINAL1 INTO WA_FINAL1 WHERE BWART = '101' OR BWART = '102'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MOVE WA_FINAL1-BUDAT TO WA_FINAL2-BUDAT.&lt;/P&gt;&lt;P&gt;    MOVE WA_FINAL1-EBELN TO WA_FINAL2-EBELN.&lt;/P&gt;&lt;P&gt;    MOVE WA_FINAL1-MENGE TO WA_FINAL2-MENGE.&lt;/P&gt;&lt;P&gt;    MOVE WA_FINAL1-DMBTR TO WA_FINAL2-DMBTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND WA_FINAL2 TO IT_FINAL2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR : WA_FINAL1.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 06:35:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271453#M1216950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T06:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in getting Norms for each BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271454#M1216951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dileep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you !! But it does'nt meet my requirement as I need the  &lt;STRONG&gt;BOM&lt;/STRONG&gt; for each &lt;STRONG&gt;ebeln&lt;/STRONG&gt; of a particular&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;matnr&lt;/STRONG&gt;. But I got the corresponding &lt;STRONG&gt;STLNR&lt;/STRONG&gt; from &lt;STRONG&gt;resb&lt;/STRONG&gt; table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I want the &lt;STRONG&gt;menge&lt;/STRONG&gt; from &lt;STRONG&gt;STKO&lt;/STRONG&gt; for the corresponding BOM of particular &lt;STRONG&gt;ebeln&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;please advice how do I get it, is there any other corresponding table for it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2009 09:52:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271454#M1216951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-17T09:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in getting Norms for each BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271455#M1216952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You try to goto MAST table with matnr and stlnr, from RESB.. and try to modify my code little,,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it works,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not you try to find some pre written code for BOM in SAP wiki, Will be helpful for you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2009 16:42:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271455#M1216952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-17T16:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in getting Norms for each BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271456#M1216953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your requirement, when there is a &lt;STRONG&gt;EBELN (P.O)&lt;/STRONG&gt; there will be s &lt;STRONG&gt;(GR) BWART = 101, 102&lt;/STRONG&gt;  &lt;/P&gt;&lt;P&gt;and this will be stored from MSEG &amp;amp; MKPF, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now just pick the MATNR as I already given i the Above code, and Dont go to RESB Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see no necessary to go for RESB Table, All you need is to given in the above code, As now i can see your requirement is same as mine/...  only the difference is to who you show the report, I show to Customs &amp;amp; you showing to someone else, Thats it. But same requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just try once my code again in a new editor and see whether it works or not...!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 01:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271456#M1216953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T01:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in getting Norms for each BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271457#M1216954</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;Just like what they said you can go to MAST, MARA and STPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MARA - to check the type of your material (FG,SEMi-FG, raw, etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAST- to check the BOM link for your material&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STPO - to check the components of of your material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it goes like MATNR(FG) pass to MAST-MATNR to get MAST-STLNR then MAST-STLNR pass to STPO-STLNR to get STPO-IDNRK . then pass to MAST-MATNR to get MAST-STLNR then MAST-STLNR pass to STPO-STLNR to get STPO-IDNRK ....so on and so forth. do this searching until you cannot retreive a record.it only means that you got all raw materials(most raw materials dont have components)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&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;Leonard Chomi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 02:11:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-getting-norms-for-each-bom/m-p/5271457#M1216954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T02:11:07Z</dc:date>
    </item>
  </channel>
</rss>

