<?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 BAPI '/AFS/BAPI_MATERIAL_SAVEDATA' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-afs-bapi-material-savedata/m-p/6621468#M1440570</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create material using BAPI '/AFS/BAPI_MATERIAL_SAVEDATA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am executing the BAPI from code it is giving error 'No description Transferred'. Error 148 from message class 'MG'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I test the BAPI from SE37 it works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Feb 2010 13:15:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-03T13:15:58Z</dc:date>
    <item>
      <title>BAPI '/AFS/BAPI_MATERIAL_SAVEDATA'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-afs-bapi-material-savedata/m-p/6621468#M1440570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create material using BAPI '/AFS/BAPI_MATERIAL_SAVEDATA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am executing the BAPI from code it is giving error 'No description Transferred'. Error 148 from message class 'MG'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I test the BAPI from SE37 it works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 13:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-afs-bapi-material-savedata/m-p/6621468#M1440570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-03T13:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI '/AFS/BAPI_MATERIAL_SAVEDATA'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-afs-bapi-material-savedata/m-p/6621469#M1440571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remember to populate the "materialdescription" table passed to the BAPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i copied my source code below.&lt;/P&gt;&lt;P&gt;Please note that you would need to adjust the code to your configuration on your system. As the material types, distribution channels, plants, storagelocation etc, might differ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&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;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;MATERIAL HEADER DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  st_mat_head-material = 'MATERIAL'. " MATERIAL NUMBER&lt;/P&gt;&lt;P&gt;  st_mat_head-ind_sector = 'M'.   " MECHANICAL ENGINERING&lt;/P&gt;&lt;P&gt;  st_mat_head-matl_type = 'VEHI'. " VEHICLE CONFIG&lt;/P&gt;&lt;P&gt;  st_mat_head-basic_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-sales_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-purchase_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-mrp_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-forecast_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-work_sched_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-prt_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-storage_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-warehouse_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-quality_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-account_view = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_head-cost_view = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;MATERIAL CLIENT DATA (BASIC DATA)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  st_mat_client-matl_group = 'RRS'. " DATA TO BE FOUND FROM BRANDSYMPHONY - Product Range Code mapping&lt;/P&gt;&lt;P&gt;  st_mat_client-base_uom = 'ST'.&lt;/P&gt;&lt;P&gt;  st_mat_client-unit_of_wt = 'KG'.&lt;/P&gt;&lt;P&gt;  st_mat_client-item_cat = '0002'. "Use configuration&lt;/P&gt;&lt;P&gt;  st_mat_client-trans_grp = '0001'. "TRANSPROTATION GROUP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  st_mat_clientx-matl_group = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_clientx-base_uom = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_clientx-unit_of_wt = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_clientx-item_cat = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_clientx-trans_grp = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;MATERIAL PLANT DATA (MRP)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  st_mat_plant-plant = '1000'. " DATA TO BE DETERMINED OFF THE NSC MASTER and mapping between Brandsymphomy - Marque field&lt;/P&gt;&lt;P&gt;  st_mat_plant-mrp_type = 'ND'. " NO PLANNING&lt;/P&gt;&lt;P&gt;  st_mat_plant-proc_type = 'X'. " PROCUREMENT TYPE&lt;/P&gt;&lt;P&gt;  st_mat_plant-period_ind = 'M'. " PERIOD INDICATOR = M FOR MONTHLY&lt;/P&gt;&lt;P&gt;  st_mat_plant-availcheck = 'KP'. " AVAILABILITY CHECK = KP FOR NO CHECK&lt;/P&gt;&lt;P&gt;  st_mat_plant-profit_ctr = '0000001900'.&lt;/P&gt;&lt;P&gt;  st_mat_plant-loadinggrp = '0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  st_mat_plantx-plant = '1000'.&lt;/P&gt;&lt;P&gt;  st_mat_plantx-mrp_type = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_plantx-proc_type = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_plantx-period_ind = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_plantx-availcheck = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_plantx-profit_ctr = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_plantx-loadinggrp = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;MATERIAL FORECAST PARAMETERS (FORECASTING)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  st_mat_fcpar-plant = '1000'.&lt;/P&gt;&lt;P&gt;  st_mat_fcpar-fore_model = 'N'. " FORECAST MODEL = N FOR NO FORECAST MODEL&lt;/P&gt;&lt;P&gt;  st_mat_fcpar-model_sp = '2'. "MODEL SELECTION PROCEDURE = 2 FOR Analytical Model selection procedure&lt;/P&gt;&lt;P&gt;  st_mat_fcpar-hist_vals = '60'. "NUMBER OF HISTORICAL PERIODS&lt;/P&gt;&lt;P&gt;  st_mat_fcpar-fore_pds = '12'. " NUMBER OF FORECAST PERIODS&lt;/P&gt;&lt;P&gt;  st_mat_fcpar-initialize = 'X'. " INITIALIZATION INDICATOR&lt;/P&gt;&lt;P&gt;  st_mat_fcpar-tracklimit = '4'. " TRACKING LIMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  st_mat_fcparx-plant = '1000'.&lt;/P&gt;&lt;P&gt;  st_mat_fcparx-fore_model = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_fcparx-model_sp = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_fcparx-hist_vals = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_fcparx-fore_pds = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_fcparx-initialize = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_fcparx-tracklimit = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;MATERIAL STORAGE LOCATION (PLANT/STORAGE)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  st_mat_sloc-plant = '1000'.&lt;/P&gt;&lt;P&gt;  st_mat_sloc-stge_loc = 'LNEW'. "STORAGE LOCATION TO BE GATHERED FROM NSC MASTER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  st_mat_slocx-plant = '1000'.&lt;/P&gt;&lt;P&gt;  st_mat_slocx-stge_loc = 'LNEW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;MATERIAL VALUATION (ACCOUNTING)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  st_mat_val-val_class = '8100'. "DATA TO BE DETERMINED FROM NSC MASTER&lt;/P&gt;&lt;P&gt;  st_mat_val-vm_so_stk = '8100'.&lt;/P&gt;&lt;P&gt;  st_mat_val-val_area = '1000'. "MAINTAINED IN CONFIG ALSO IN TABLE T001K-BWKEY&lt;/P&gt;&lt;P&gt;  st_mat_val-val_cat = 'X'. " VALUATION CATEGORY INDICATOR&lt;/P&gt;&lt;P&gt;  st_mat_val-price_ctrl = 'V'. " NOT USING STANDARD PRICING&lt;/P&gt;&lt;P&gt;  st_mat_val-price_unit = '1'. " PRICING UNIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  st_mat_valx-val_area = '1000'.&lt;/P&gt;&lt;P&gt;  st_mat_valx-val_class = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_valx-val_cat = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_valx-price_ctrl = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_valx-price_unit = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_valx-vm_so_stk = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;MATERIAL SALES (SALES ORG)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  st_mat_sales-sales_org = '1000' ."SALES ORGANIZATION&lt;/P&gt;&lt;P&gt;  st_mat_sales-distr_chan = '10'.  " DISTRIBUTION CHANNEL&lt;/P&gt;&lt;P&gt;  st_mat_sales-cash_disc = 'X'. "CASH DISCOUNT INDICATOR&lt;/P&gt;&lt;P&gt;  st_mat_sales-item_cat = '0002'. " DETERMINED ON CONFIG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  st_mat_salesx-sales_org = '1000'.&lt;/P&gt;&lt;P&gt;  st_mat_salesx-distr_chan = '10'.&lt;/P&gt;&lt;P&gt;  st_mat_salesx-cash_disc = 'X'.&lt;/P&gt;&lt;P&gt;  st_mat_salesx-item_cat = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  i_mat_des-matl_desc = 'MODEL DESCRIPTION FOR NEW VEHICLE'.&lt;/P&gt;&lt;P&gt;  i_mat_des-langu = sy-langu.&lt;/P&gt;&lt;P&gt;  APPEND i_mat_des.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  i_mat_uom-alt_unit = 'ST'.&lt;/P&gt;&lt;P&gt;  APPEND i_mat_uom.&lt;/P&gt;&lt;P&gt;  i_mat_uomx-alt_unit = 'ST'.&lt;/P&gt;&lt;P&gt;  APPEND i_mat_uomx.&lt;/P&gt;&lt;P&gt;  i_mat_taxclass-taxclass_1 = '1'. "DEPENDANT ON NSC&lt;/P&gt;&lt;P&gt;  i_mat_taxclass-tax_type_1 = 'MWST'. " TAX CLASSIFICATION TYPE&lt;/P&gt;&lt;P&gt;  i_mat_taxclass-depcountry = 'ZA'. "COUNTRY TO BE DERIVED FROM NSC&lt;/P&gt;&lt;P&gt;  APPEND i_mat_taxclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM call_material_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      headdata             = st_mat_head&lt;/P&gt;&lt;P&gt;      clientdata           = st_mat_client&lt;/P&gt;&lt;P&gt;      clientdatax          = st_mat_clientx&lt;/P&gt;&lt;P&gt;      plantdata            = st_mat_plant&lt;/P&gt;&lt;P&gt;      plantdatax           = st_mat_plantx&lt;/P&gt;&lt;P&gt;      forecastparameters   = st_mat_fcpar&lt;/P&gt;&lt;P&gt;      forecastparametersx  = st_mat_fcparx&lt;/P&gt;&lt;P&gt;      storagelocationdata  = st_mat_sloc&lt;/P&gt;&lt;P&gt;      storagelocationdatax = st_mat_slocx&lt;/P&gt;&lt;P&gt;      valuationdata        = st_mat_val&lt;/P&gt;&lt;P&gt;      valuationdatax       = st_mat_valx&lt;/P&gt;&lt;P&gt;      warehousenumberdata  = st_mat_whdata&lt;/P&gt;&lt;P&gt;      warehousenumberdatax = st_mat_whdatax&lt;/P&gt;&lt;P&gt;      salesdata            = st_mat_sales&lt;/P&gt;&lt;P&gt;      salesdatax           = st_mat_salesx&lt;/P&gt;&lt;P&gt;      storagetypedata      = st_mat_store&lt;/P&gt;&lt;P&gt;      storagetypedatax     = st_mat_storex&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      return               = st_mat_ret&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      materialdescription  = i_mat_des&lt;/P&gt;&lt;P&gt;      unitsofmeasure       = i_mat_uom&lt;/P&gt;&lt;P&gt;      unitsofmeasurex      = i_mat_uomx&lt;/P&gt;&lt;P&gt;      taxclassifications   = i_mat_taxclass&lt;/P&gt;&lt;P&gt;      returnmessages       = i_mat_return.&lt;/P&gt;&lt;P&gt;  COMMIT WORK AND WAIT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 10:42:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-afs-bapi-material-savedata/m-p/6621469#M1440571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-22T10:42:53Z</dc:date>
    </item>
  </channel>
</rss>

