<?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: BAPI (BOM) TOP Material in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bom-top-material/m-p/3686864#M887816</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;I know functions that get the structure to the deepest level but on the opposite way not ... and it would interesting to learn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might suggest that you work with a loop in order to get the top-level in the structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO WHILE SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Call function CS_WHERE_USED_MAT&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;          MATNR = MYMATNR&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;      exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;     read table MATCAT where ....&lt;/P&gt;&lt;P&gt;     move MATCAT-MATNR to MYMATNR.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    subrc = 4.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Apr 2008 15:21:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-08T15:21:40Z</dc:date>
    <item>
      <title>BAPI (BOM) TOP Material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bom-top-material/m-p/3686863#M887815</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;I have the following problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection: Material (Component)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can find the next BOM level with the FM "CS_WHERE_USED_MAT". But I need the TOP level.&lt;/P&gt;&lt;P&gt;Is there a better FM/BAPI that I can use to find the last material number (final assembly)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2008 12:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bom-top-material/m-p/3686863#M887815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-08T12:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI (BOM) TOP Material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bom-top-material/m-p/3686864#M887816</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;I know functions that get the structure to the deepest level but on the opposite way not ... and it would interesting to learn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might suggest that you work with a loop in order to get the top-level in the structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO WHILE SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Call function CS_WHERE_USED_MAT&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;          MATNR = MYMATNR&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;      exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;     read table MATCAT where ....&lt;/P&gt;&lt;P&gt;     move MATCAT-MATNR to MYMATNR.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    subrc = 4.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2008 15:21:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bom-top-material/m-p/3686864#M887816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-08T15:21:40Z</dc:date>
    </item>
  </channel>
</rss>

