<?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: Old material in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698320#M306262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You  might want to try something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

types: begin of tma,
       matnr type mara-matnr,
       bismt type mara-bismt,
       end of tma.

data: ima type table of tma.
data: xma type tma.
data: yma type tma.

parameters: p_matnr type  mara-matnr.


start-of-selection.

  select matnr bismt into table ima
         from mara
             where matnr = p_matnr.

  loop at ima into xma.

    call function 'CONVERSION_EXIT_ALPHA_INPUT'
         exporting
              input  = xma-bismt
         importing
              output = xma-bismt.

    clear yma.
    select single matnr bismt into yma
          from mara
               where matnr = xma-bismt.

    if not yma-bismt is initial.
      append yma to ima.
    endif.

  endloop.


  loop at ima into xma.
    write:/ xma-matnr, xma-bismt.
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for the call to 'CONVERSION_EXIT_ALPHA_INPUT' is that in my system, the old material numbers where not entered with leading zeros as the MATNR is stored in MARA, so I must convert in order to get a hit on MARA.&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>Fri, 27 Oct 2006 17:33:21 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-10-27T17:33:21Z</dc:date>
    <item>
      <title>Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698313#M306255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is there any function module to get all old materials for a material from MARA?? There can be many old materials for a material. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, What logic should I apply to get all old materials?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 17:06:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698313#M306255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-27T17:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698314#M306256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean old material numbers?  This is field BISMT in table MARA, you can simply do a SELECT statement again MARA.&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>Fri, 27 Oct 2006 17:14:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698314#M306256</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-27T17:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698315#M306257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are correct. But this OLD material can have another old material and so on, over a period of time.&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,&lt;/P&gt;&lt;P&gt;Amol..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 17:17:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698315#M306257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-27T17:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698316#M306258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, I see.........  &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>Fri, 27 Oct 2006 17:18:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698316#M306258</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-27T17:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698317#M306259</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;In the table MARA you will current old material number..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get all the old material numbers..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the FM CHANGEDOCUMENT_READ with the following data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECTCLASS                     MATERIAL  &lt;/P&gt;&lt;P&gt;OBJECTID                        Material number&lt;/P&gt;&lt;P&gt;TABLEKEY                                  &lt;/P&gt;&lt;P&gt;TABLENAME                       MARA      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the return parameter EDITPOS..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the internal table EDITPOS.. check the field FNAME check for the value  'BSMIT' with CHNGIND = 'U'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then get the values from the field F_OLD with the above combinations..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will all the old material numbers used for that material..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is what you want..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 17:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698317#M306259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-27T17:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698318#M306260</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 don't think there will be many old materials for a material. I am not sure about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUt you can findout old material for a material from MARA table. Field name is MARA-BISMT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can get the list from MARA table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ramakrishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 17:19:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698318#M306260</guid>
      <dc:creator>venkata_ramisetti</dc:creator>
      <dc:date>2006-10-27T17:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698319#M306261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could do a recursive call to a select statement that retrieves the old number. Do this until none is found for a material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 17:19:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698319#M306261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-27T17:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698320#M306262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You  might want to try something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

types: begin of tma,
       matnr type mara-matnr,
       bismt type mara-bismt,
       end of tma.

data: ima type table of tma.
data: xma type tma.
data: yma type tma.

parameters: p_matnr type  mara-matnr.


start-of-selection.

  select matnr bismt into table ima
         from mara
             where matnr = p_matnr.

  loop at ima into xma.

    call function 'CONVERSION_EXIT_ALPHA_INPUT'
         exporting
              input  = xma-bismt
         importing
              output = xma-bismt.

    clear yma.
    select single matnr bismt into yma
          from mara
               where matnr = xma-bismt.

    if not yma-bismt is initial.
      append yma to ima.
    endif.

  endloop.


  loop at ima into xma.
    write:/ xma-matnr, xma-bismt.
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for the call to 'CONVERSION_EXIT_ALPHA_INPUT' is that in my system, the old material numbers where not entered with leading zeros as the MATNR is stored in MARA, so I must convert in order to get a hit on MARA.&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>Fri, 27 Oct 2006 17:33:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698320#M306262</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-27T17:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698321#M306263</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 GET_MATERIAL_ID retruns list of all materials for a given old material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the code from thsi function module. May be it is usefull to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ramakrishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 17:33:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698321#M306263</guid>
      <dc:creator>venkata_ramisetti</dc:creator>
      <dc:date>2006-10-27T17:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Old material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698322#M306264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rich. I will modify this program and use it for multiple materials. Any suggestions while doing so.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 17:57:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/old-material/m-p/1698322#M306264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-27T17:57:55Z</dc:date>
    </item>
  </channel>
</rss>

