<?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: BOM-FM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457168#M216033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure this function module takes a material number and plant and explodes the bill of material for all components of the parent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: begin of stpox occurs 1000.
        include structure stpox.
data: end of stpox.

parameters: p_matnr type marc-matnr,
            p_werks type marc-werks.

  call function 'CS_BOM_EXPL_MAT_V2'
       exporting
            capid                 = 'PP01'
            mehrs                 = 'X'
            datuv                 = sy-datum
            mtnrv                 = P_matnr
            werks                 = p_werks
            emeng                 = '1'
       tables
            stb                   = stpox
       exceptions
            alt_not_found         = 1
            call_invalid          = 2
            material_not_found    = 3
            missing_authorization = 4
            no_bom_found          = 5
            no_plant_data         = 6
            no_suitable_bom_found = 7
            others                = 8.

loop at stpox.
write:/ stpox.
endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, take material "A", we pass this to the function module.  Say that material "A" bom includes components  B C D.  These would should in the result table.  It will also show the component of B, C, and D if they are BOMs, and so on.&lt;/P&gt;&lt;P&gt;&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jun 2006 16:47:25 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-06-28T16:47:25Z</dc:date>
    <item>
      <title>BOM-FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457166#M216031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anyone tell me about function module cs_bom_expl_mat_v2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 16:43:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457166#M216031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T16:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: BOM-FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457167#M216032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Ravi,&lt;/P&gt;&lt;P&gt; Check this out&lt;/P&gt;&lt;P&gt;call function &amp;lt;b&amp;gt;'CS_BOM_EXPL_MAT_V2'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;capid = 'PP01'&lt;/P&gt;&lt;P&gt;datuv = sy-datum&lt;/P&gt;&lt;P&gt;emeng = p_req_menge&lt;/P&gt;&lt;P&gt;mktls = 'X'&lt;/P&gt;&lt;P&gt;mehrs = 'X'&lt;/P&gt;&lt;P&gt;mtnrv = p_material&lt;/P&gt;&lt;P&gt;stlal = p_w_stlal &lt;/P&gt;&lt;P&gt;stlan = '1'&lt;/P&gt;&lt;P&gt;stpst = 0&lt;/P&gt;&lt;P&gt;svwvo = 'X'&lt;/P&gt;&lt;P&gt;werks = p_plant&lt;/P&gt;&lt;P&gt;vrsvo = 'X'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;stb = w_stpox&lt;/P&gt;&lt;P&gt;matcat = w_cscmat.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;http://www.geocities.com/victorav15/sapr3/abapfun.html&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="38268"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ittoolbox.com/groups/technical-functional/SAP-R3-DEV/fm-cs_bom_expl_mat_v2-188319" target="test_blank"&gt;http://sap.ittoolbox.com/groups/technical-functional/SAP-R3-DEV/fm-cs_bom_expl_mat_v2-188319&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;santosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Santosh Kumar P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 16:45:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457167#M216032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T16:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: BOM-FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457168#M216033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure this function module takes a material number and plant and explodes the bill of material for all components of the parent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: begin of stpox occurs 1000.
        include structure stpox.
data: end of stpox.

parameters: p_matnr type marc-matnr,
            p_werks type marc-werks.

  call function 'CS_BOM_EXPL_MAT_V2'
       exporting
            capid                 = 'PP01'
            mehrs                 = 'X'
            datuv                 = sy-datum
            mtnrv                 = P_matnr
            werks                 = p_werks
            emeng                 = '1'
       tables
            stb                   = stpox
       exceptions
            alt_not_found         = 1
            call_invalid          = 2
            material_not_found    = 3
            missing_authorization = 4
            no_bom_found          = 5
            no_plant_data         = 6
            no_suitable_bom_found = 7
            others                = 8.

loop at stpox.
write:/ stpox.
endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, take material "A", we pass this to the function module.  Say that material "A" bom includes components  B C D.  These would should in the result table.  It will also show the component of B, C, and D if they are BOMs, and so on.&lt;/P&gt;&lt;P&gt;&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 16:47:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457168#M216033</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-28T16:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: BOM-FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457169#M216034</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;   this will expolde all the components to highest BOM level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 16:48:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457169#M216034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T16:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: BOM-FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457170#M216035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;FYI&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FU CS_BOM_EXPL_MAT_V2 ____________________________________________________ short text inventories solution; got into:  Material&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doku of the parameters:  Parameter BESSL - selection mark by place part basically counts:  If the parameter is set, is looked over in table T417 with the by place-mark of the inventories position whether there customers by place is marked part or suppliers by place part.  If not, is not selected the position.  Possible values for give parameter are:  X:  The position counts than selects 1:  Delivers only customer by place parts 2:  Only supplier by place part parameter BEIKZ delivers - by place mark reviewed whether you give by place mark of the position is identical, is with that petition out of table T417.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameter FTREL ALEKZ ALTVO AUFSW AUMGB AUMNG AUSKZ AMIND BRAKE CAPID CHLST COSPR CUOBJ CUOVS CUOLS DATUV DELNL of WORKS NORVL MDNOT PANOT QVERW VERID VRSVO&lt;/P&gt;&lt;P&gt;TOPMAT DSTST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions OLD_NEED_ALT CALL_INVALID MATERIAL_NEED_MATERIAL MISSING_AUTHORIZATION NEED_BOM_FOUND NEED_PLANS_DATES NEED_SUITABLE_BOM_NOT CONVERSION_ERROR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function group CSS4&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;&lt;/P&gt;&lt;P&gt;Hope this&amp;#146;ll give you idea!!&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Pl... award the points.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Good luck &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saquib Khan&lt;/P&gt;&lt;P&gt;"Some are wise and some are otherwise"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 16:49:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457170#M216035</guid>
      <dc:creator>former_member181966</dc:creator>
      <dc:date>2006-06-28T16:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: BOM-FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457171#M216036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;explanation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explode BOM for Production. Mostly necessary input parameters: &lt;/P&gt;&lt;P&gt;CAPID (Application Id): 'PP01' (Production - general) &lt;/P&gt;&lt;P&gt;DATUV (Validity date) &lt;/P&gt;&lt;P&gt;MTNRV (Material) &lt;/P&gt;&lt;P&gt;WERKS (Plant) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report z.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Explode assembly (including phantom assemblies up to last level)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters:     p_werks like t001w-werks obligatory,&lt;/P&gt;&lt;P&gt;                p_matnr like mara-matnr  obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants c_x value 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_comp occurs 0,&lt;/P&gt;&lt;P&gt;        idnrk like stpox-idnrk,&lt;/P&gt;&lt;P&gt;        ojtxp like stpox-ojtxp,&lt;/P&gt;&lt;P&gt;        menge like stpox-menge,&lt;/P&gt;&lt;P&gt;        meins like stpox-meins,&lt;/P&gt;&lt;P&gt;        matkl like stpox-matmk,&lt;/P&gt;&lt;P&gt;      end of it_comp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: w_topmat like cstmat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;*******************&lt;/P&gt;&lt;P&gt;  perform explode_assembly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;*****************&lt;/P&gt;&lt;P&gt;  perform write_report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************&lt;/P&gt;&lt;P&gt;top-of-page.&lt;/P&gt;&lt;P&gt;************&lt;/P&gt;&lt;P&gt;  perform print_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form print_header.&lt;/P&gt;&lt;P&gt;  write: /(18) 'Component'(h00),&lt;/P&gt;&lt;P&gt;          (40) 'Description'(h01),&lt;/P&gt;&lt;P&gt;               'Mat.Group'(h02),&lt;/P&gt;&lt;P&gt;          (18) 'Quantity'(h03).&lt;/P&gt;&lt;P&gt;  uline.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form write_report.&lt;/P&gt;&lt;P&gt;  write: / w_topmat-matnr under text-h00 color col_heading,&lt;/P&gt;&lt;P&gt;           w_topmat-maktx under text-h01 color col_heading.&lt;/P&gt;&lt;P&gt;  loop at  it_comp.&lt;/P&gt;&lt;P&gt;    write: /&lt;/P&gt;&lt;P&gt;      it_comp-idnrk under text-h00,&lt;/P&gt;&lt;P&gt;      it_comp-ojtxp under text-h01,&lt;/P&gt;&lt;P&gt;      it_comp-matkl under text-h02,&lt;/P&gt;&lt;P&gt;      it_comp-menge unit it_comp-meins under text-h03,&lt;/P&gt;&lt;P&gt;      it_comp-meins.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  uline.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form explode_assembly.&lt;/P&gt;&lt;P&gt;  data: it_stb like stpox occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        it_stb2 like stpox occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        it_stb3 like stpox occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        w_msg(255) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Explode highest level:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'CS_BOM_EXPL_MAT_V2'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            capid                 = 'PP01'&lt;/P&gt;&lt;P&gt;            cuols                 = c_x&lt;/P&gt;&lt;P&gt;            datuv                 = sy-datum&lt;/P&gt;&lt;P&gt;            knfba                 = c_x&lt;/P&gt;&lt;P&gt;            ksbvo                 = c_x&lt;/P&gt;&lt;P&gt;            mbwls                 = c_x&lt;/P&gt;&lt;P&gt;            mdmps                 = c_x&lt;/P&gt;&lt;P&gt;            mtnrv                 = p_matnr&lt;/P&gt;&lt;P&gt;            werks                 = p_werks&lt;/P&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;            topmat                = w_topmat&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            stb                   = it_stb&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            alt_not_found         = 1&lt;/P&gt;&lt;P&gt;            call_invalid          = 2&lt;/P&gt;&lt;P&gt;            material_not_found    = 3&lt;/P&gt;&lt;P&gt;            missing_authorization = 4&lt;/P&gt;&lt;P&gt;            no_bom_found          = 5&lt;/P&gt;&lt;P&gt;            no_plant_data         = 6&lt;/P&gt;&lt;P&gt;            no_suitable_bom_found = 7&lt;/P&gt;&lt;P&gt;            conversion_error      = 8&lt;/P&gt;&lt;P&gt;            others                = 9.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4&lt;/P&gt;&lt;P&gt;            into w_msg.&lt;/P&gt;&lt;P&gt;    write: / w_msg.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Don't process documents&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  delete it_stb where idnrk is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Don't process valid from furure:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  delete it_stb where datuv &amp;gt;= sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Explode phantom assemblies up to last level&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    it_stb2[] = it_stb[].&lt;/P&gt;&lt;P&gt;    delete it_stb2 where dumps is initial.&lt;/P&gt;&lt;P&gt;    if it_stb2[] is initial.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    delete it_stb where not dumps is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at it_stb2.&lt;/P&gt;&lt;P&gt;      call function 'CS_BOM_EXPL_MAT_V2'&lt;/P&gt;&lt;P&gt;           exporting&lt;/P&gt;&lt;P&gt;                capid                 = 'PP01'&lt;/P&gt;&lt;P&gt;                cuols                 = c_x&lt;/P&gt;&lt;P&gt;                datuv                 = sy-datum&lt;/P&gt;&lt;P&gt;                knfba                 = c_x&lt;/P&gt;&lt;P&gt;                ksbvo                 = c_x&lt;/P&gt;&lt;P&gt;                mbwls                 = c_x&lt;/P&gt;&lt;P&gt;                mdmps                 = c_x&lt;/P&gt;&lt;P&gt;                mtnrv                 = it_stb2-idnrk&lt;/P&gt;&lt;P&gt;                werks                 = p_werks&lt;/P&gt;&lt;P&gt;           tables&lt;/P&gt;&lt;P&gt;                stb                   = it_stb3&lt;/P&gt;&lt;P&gt;           exceptions&lt;/P&gt;&lt;P&gt;                alt_not_found         = 1&lt;/P&gt;&lt;P&gt;                call_invalid          = 2&lt;/P&gt;&lt;P&gt;                material_not_found    = 3&lt;/P&gt;&lt;P&gt;                missing_authorization = 4&lt;/P&gt;&lt;P&gt;                no_bom_found          = 5&lt;/P&gt;&lt;P&gt;                no_plant_data         = 6&lt;/P&gt;&lt;P&gt;                no_suitable_bom_found = 7&lt;/P&gt;&lt;P&gt;                conversion_error      = 8&lt;/P&gt;&lt;P&gt;                others                = 9.&lt;/P&gt;&lt;P&gt;      if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4&lt;/P&gt;&lt;P&gt;                into w_msg.&lt;/P&gt;&lt;P&gt;        write: / w_msg.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        delete it_stb3 where idnrk is initial.&lt;/P&gt;&lt;P&gt;        loop at it_stb3.&lt;/P&gt;&lt;P&gt;          multiply it_stb3-menge by it_stb2-menge.&lt;/P&gt;&lt;P&gt;          modify it_stb3 transporting menge.&lt;/P&gt;&lt;P&gt;        endloop.&lt;/P&gt;&lt;P&gt;        append lines of it_stb3 to it_stb.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build table of components collecting the same components from&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;all levels&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at it_stb.&lt;/P&gt;&lt;P&gt;    it_comp-matkl = it_stb-matmk.&lt;/P&gt;&lt;P&gt;    it_comp-idnrk = it_stb-idnrk.&lt;/P&gt;&lt;P&gt;    it_comp-ojtxp = it_stb-ojtxp.&lt;/P&gt;&lt;P&gt;    it_comp-menge = it_stb-menge.&lt;/P&gt;&lt;P&gt;    it_comp-meins = it_stb-meins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    collect it_comp.&lt;/P&gt;&lt;P&gt;    clear it_comp.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 16:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457171#M216036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T16:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: BOM-FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457172#M216037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;function module cs_bom_expl_mat_v2&lt;/P&gt;&lt;P&gt;The required fields for this function module are :&lt;/P&gt;&lt;P&gt;&amp;gt; Material&lt;/P&gt;&lt;P&gt;&amp;gt; Plant&lt;/P&gt;&lt;P&gt;&amp;gt; Date&lt;/P&gt;&lt;P&gt;&amp;gt; Application(CAPID)&lt;/P&gt;&lt;P&gt;&amp;gt; Values for CAPID can be found in table TC04&lt;/P&gt;&lt;P&gt;&amp;gt; For production BOM it is PP01&lt;/P&gt;&lt;P&gt;The required fields for this function module are :&lt;/P&gt;&lt;P&gt;&amp;gt; Material&lt;/P&gt;&lt;P&gt;&amp;gt; Plant&lt;/P&gt;&lt;P&gt;&amp;gt; Date&lt;/P&gt;&lt;P&gt;&amp;gt; Application(CAPID)&lt;/P&gt;&lt;P&gt;&amp;gt; Values for CAPID can be found in table TC04&lt;/P&gt;&lt;P&gt;&amp;gt; For production BOM it is PP01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Multi level items are exploded only if one of the Import parameters in the function module is checked. I forgot which one but you can refer to the following code for the function module which gave me multi level bom explosions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'CS_BOM_EXPL_MAT_V2'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;capid = 'PP01'&lt;/P&gt;&lt;P&gt;datuv = sy-datum&lt;/P&gt;&lt;P&gt;emeng = p_req_menge&lt;/P&gt;&lt;P&gt;mktls = 'X'&lt;/P&gt;&lt;P&gt;mehrs = 'X'&lt;/P&gt;&lt;P&gt;mtnrv = p_material&lt;/P&gt;&lt;P&gt;stlal = p_w_stlal &lt;/P&gt;&lt;P&gt;stlan = '1'&lt;/P&gt;&lt;P&gt;stpst = 0&lt;/P&gt;&lt;P&gt;svwvo = 'X'&lt;/P&gt;&lt;P&gt;werks = p_plant&lt;/P&gt;&lt;P&gt;vrsvo = 'X'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;stb = w_stpox&lt;/P&gt;&lt;P&gt;matcat = w_cscmat.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; I guess this should help&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;keerthi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: keerthi kiran varanasi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 16:53:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457172#M216037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T16:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: BOM-FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457173#M216038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank u rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;problem is solved,but&lt;/P&gt;&lt;P&gt;why did u use &lt;/P&gt;&lt;P&gt;write:\ stpox.&lt;/P&gt;&lt;P&gt;will it work in release 4.7?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and what mehrs mean?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 17:44:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457173#M216038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T17:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: BOM-FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457174#M216039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Write:/stpox is just mearly writing out the results.  I didn't want to take to the time to write out individual fields.  In your case, I would suggest writing our whatever fields you want to see in the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 17:47:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-fm/m-p/1457174#M216039</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-28T17:47:11Z</dc:date>
    </item>
  </channel>
</rss>

