<?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: code to modify commodity code of a material in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-to-modify-commodity-code-of-a-material/m-p/2940576#M693222</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;PRE&gt;&lt;CODE&gt;
DATA:
  ls_marc  TYPE bapi_marc,
  ls_marcx TYPE bapi_marcx,
  ls_head  TYPE bapimathead.

ls_head-material = &amp;lt;matnr&amp;gt;.
ls_head-ind_sector = &amp;lt;ind_sect&amp;gt;.
ls_head-matl_type = &amp;lt;matl_type&amp;gt;.
ls_head-sales_view = 'X'.

ls_marc-plant = &amp;lt;plant&amp;gt;.
ls_marc-comm_code = &amp;lt;comm_code&amp;gt;.

ls_marcx-plant = &amp;lt;plant&amp;gt;.
ls_marcx-comm_code = 'X'.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
  EXPORTING
    headdata = ls_head
    plant_data = ls_marc
    plant_datax = ls_marcx
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps (please reward me if it does).&lt;/P&gt;&lt;P&gt;Regards, Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2007 09:58:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-16T09:58:14Z</dc:date>
    <item>
      <title>code to modify commodity code of a material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-to-modify-commodity-code-of-a-material/m-p/2940575#M693221</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;Could any one send me the code( Parameters to be passed to the BAPI_MATERIAL_SAVEDATA)   to modify only the commodity code of a material.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 08:54:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-to-modify-commodity-code-of-a-material/m-p/2940575#M693221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T08:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: code to modify commodity code of a material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-to-modify-commodity-code-of-a-material/m-p/2940576#M693222</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;PRE&gt;&lt;CODE&gt;
DATA:
  ls_marc  TYPE bapi_marc,
  ls_marcx TYPE bapi_marcx,
  ls_head  TYPE bapimathead.

ls_head-material = &amp;lt;matnr&amp;gt;.
ls_head-ind_sector = &amp;lt;ind_sect&amp;gt;.
ls_head-matl_type = &amp;lt;matl_type&amp;gt;.
ls_head-sales_view = 'X'.

ls_marc-plant = &amp;lt;plant&amp;gt;.
ls_marc-comm_code = &amp;lt;comm_code&amp;gt;.

ls_marcx-plant = &amp;lt;plant&amp;gt;.
ls_marcx-comm_code = 'X'.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
  EXPORTING
    headdata = ls_head
    plant_data = ls_marc
    plant_datax = ls_marcx
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps (please reward me if it does).&lt;/P&gt;&lt;P&gt;Regards, Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 09:58:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-to-modify-commodity-code-of-a-material/m-p/2940576#M693222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T09:58:14Z</dc:date>
    </item>
  </channel>
</rss>

