<?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: Error in BAPI_MATERIAL_SAVEDATA in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-material-savedata/m-p/7145803#M1514019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It turns the cause of my issue is that the sales unit in the structure SALESDATA is the same as the Base UOM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sales unit field can be filled up only if it is different from the base uom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Aug 2010 08:50:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-01T08:50:12Z</dc:date>
    <item>
      <title>Error in BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-material-savedata/m-p/7145802#M1514018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been attempting to create material master data using &lt;STRONG&gt;BAPI_MATERIAL_SAVEDATA&lt;/STRONG&gt;.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm trying to do is populate the fields &lt;STRONG&gt;Gross Weight, Gross weight unit, EAN/UPC, EAN Category, Volume, and Volume unit&lt;/STRONG&gt; in the basic data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've searched through the forums and for the most part the recommended solution is to populate the table &lt;STRONG&gt;UNITSOFMEASURE/UNITSOFMEASUREX (BAPI_MARM/BAPI_MARMX)&lt;/STRONG&gt;, with the field &lt;STRONG&gt;ALT_UNIT&lt;/STRONG&gt; = &lt;STRONG&gt;BASE_UOM&lt;/STRONG&gt; from the CLIENDDATA structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During debugging I am encountering the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The alternative unit of measure is the same as the base unit of measure"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what I'm doing wrong on this part.  Please please can anyone help me?  Below is the code used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To populate client data:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: v_iprkz    TYPE MARA-IPRKZ.

  wa_clientdata-matl_group    = wa_upltab-matkl.
  wa_clientdata-base_uom      = wa_upltab-meins.
  wa_clientdata-net_weight    = wa_upltab-ntgew.
  wa_clientdata-unit_of_wt    = wa_upltab-gewei.
  wa_clientdata-division      = wa_upltab-spart.
  wa_clientdata-trans_grp     = wa_upltab-tragr.
  wa_clientdata-po_unit       = wa_upltab-bstme.
  wa_clientdata-stor_conds    = wa_upltab-raube.
  wa_clientdata-minremlife    = wa_upltab-mhdrz.
  wa_clientdata-shelf_life    = wa_upltab-mhdhb.
  CASE wa_upltab-iprkz.
  WHEN 'D'.
    v_iprkz = SPACE.
  WHEN 'W'.
    v_iprkz = '1'.
  WHEN 'M'.
    v_iprkz = '2'.
  WHEN 'Y'.
    v_iprkz = '3'.
  ENDCASE.
  wa_clientdata-period_ind_expiration_date = v_iprkz.
  wa_clientdata-size_dim      = wa_upltab-groes.

  wa_clientdatax-matl_group   = 'X'.
  wa_clientdatax-base_uom     = 'X'.
  wa_clientdatax-net_weight   = 'X'.
  wa_clientdatax-unit_of_wt   = 'X'.
  wa_clientdatax-division     = 'X'.
  wa_clientdatax-trans_grp    = 'X'.
  wa_clientdatax-po_unit      = 'X'.
  wa_clientdatax-stor_conds   = 'X'.
  wa_clientdatax-minremlife   = 'X'.
  wa_clientdatax-shelf_life   = 'X'.
  wa_clientdatax-period_ind_expiration_date = 'X'.
  wa_clientdatax-size_dim     = 'X'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To populate the Units of Measure table:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

FORM PREPARE_UOM .
*---- base uom
  CLEAR i_uom.
  i_uom-alt_unit        = wa_upltab-meins.
  i_uom-alt_unit_iso    = wa_upltab-meins.
  i_uom-ean_upc         = wa_upltab-ean11.
  i_uom-ean_cat         = wa_upltab-numtp.
  i_uom-numerator       = 1.
  i_uom-denominatr      = 1.
  i_uom-volume          = wa_upltab-volum.
  i_uom-volumeunit      = wa_upltab-voleh.
  i_uom-gross_wt        = wa_upltab-brgew.
  i_uom-unit_of_wt      = wa_upltab-brwei.
  APPEND i_uom.
  CLEAR i_uomx.
  i_uomx-alt_unit        = wa_upltab-meins.
  i_uomx-alt_unit_iso    = wa_upltab-meins.
  i_uomx-ean_upc         = 'X'.
  i_uomx-ean_cat         = 'X'.
  i_uomx-numerator       = 'X'.
  i_uomx-denominatr      = 'X'.
  i_uomx-volume          = 'X'.
  i_uomx-volumeunit      = 'X'.
  i_uomx-gross_wt        = 'X'.
  i_uomx-unit_of_wt      = 'X'.
  APPEND i_uomx.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Aug 2010 03:42:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-material-savedata/m-p/7145802#M1514018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-01T03:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-material-savedata/m-p/7145803#M1514019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It turns the cause of my issue is that the sales unit in the structure SALESDATA is the same as the Base UOM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sales unit field can be filled up only if it is different from the base uom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Aug 2010 08:50:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-material-savedata/m-p/7145803#M1514019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-01T08:50:12Z</dc:date>
    </item>
  </channel>
</rss>

