Problem in changing material master through BAPI_MATERIAL_SAVEDATA

Hi Gurus,
I am trying to update the custom field in accounting view, I am using BAPI_MATERIAL_SAVEDATA for this purpose. But apparantly, it is not working as desired. In last i am getting these value in returnmessages tab.
Trying to create: 00396 ____ ____ 0110 __________ ____ __ ___ ___      
The material cannot be maintained since no maintainable data transferred
Trying to change: 00396 ____ ____ 0110 __________ ____ __ ___ ___      
No changes made                                                        
Here is my code
ds_valuedata-VAL_AREA =  t_final-bwkey.
ds_valuedata-VAL_TYPE = t_final-bwtar.
ds_valuedata-zzpromo = t_final-zzpromo.          <<<<<<<< THIS FIELD I NEED TO UPDATE
ds_valuedatax-VAL_AREA =  t_final-bwkey.
ds_valuedatax-VAL_TYPE = t_final-bwtar.
ds_valuedatax-zzpromo = 'X'.
      ls_extensionin-structure   = 'BAPI_TE_MBEW'.
      ls_extensionin-valuepart1  = ds_valuedata.
      APPEND ls_extensionin  TO lt_extensionin.
      ls_extensioninx-structure  = 'BAPI_TE_MBEWX'.
      ls_extensioninx-valuepart1 = ds_valuedatax.
      APPEND ls_extensioninx TO lt_extensioninx.
      CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
          headdata       = ds_headdata
        IMPORTING
          return         = ds_bapiret2
        TABLES
          returnmessages = lt_returnmessages
          extensionin    = lt_extensionin
          extensioninx   = lt_extensioninx.
Please help me as i am badly stuck with this problem.

after all use call
BAPI_TRANSACTION_COMMIT
Amit.

Similar Messages

  • Problem in extending material master data using BAPI?

    Hi all,
    I have created a program to upload material master using BAPI_MATERIAL_SAVEDATA WITH VIEWS
    Basic view, purchase view, account view , storage view and MRP view. I am successful while uploading this data while not  taking  the valuation type  field to account view(passing only valuation area,valuation class and moving price).
    But when i am trying to pass valuation type field also then it is giving error as 'First create the valuation-type-independent data' .
    So i have written another program to extend this material to enter valuation type , then it is giving the error as 'Valuation category does not allow split valuation'.
    Please help me to solve this problem and while modifying what are the mandatory values to pass to BAPI?
    Thanks,
    Vamshi.

    Hi VAMSHI,
    I have your same error but I don't know how to solve it. We have active "material split valuation" and valuation type is mandatory field if using ACCOUNTING and COSTING views.
    Please, let me know.
    Thanks in advance.
    GB

  • Error while trying to change Material master

    Hi ,
    I am getting following error when I am trying to Change material master thru Tcode MM02
    "Required parameter missing when calling up module MARA_SINGLE_READ"
    In fact , I also couldn't select this Material in Purchase order .Error which i am getting is "Faulty Material"
    Could anyone pls help me.
    Regards
    Sandeep marwha

    I created a new material also , but for that also I am getting same error.
    Regards
    Sandeep

  • I have encountered a peculiar problem in MM01 material master upload.

    I have encountered a peculiar problem in MM01 material master upload. The
    BDC program uploads data using Session method. The problem is when i
    process the session in foreground mode the data uploads successfully, but
    when i process it in background mode it gives the following errors in the
    log.
    'Control Framework: Fatal error - GUI cannot be reached'.
    'Runtime error RAISE_EXCEPTION has occurred'.
    When i debugged the program i found that this error is encountered when
    data is being input in 'Purchase Order text' editor of MM01 transaction.
    There is no problem with the BDC recording or the program as i could see.
    The only problem what i believe is the system is unable to call the text
    editor for inputting purchase order text data in background mode.

    Hi
    Try uploading a BAPI it would be better
    http://www.saptechies.com/mm01-upload-using-bapi/
    Regards
    Shiva

  • Control to  create or change material master

    I want to let a group person to create or change material maters only with material group 16. I found an auth. obj. M_MATE_WGR, and set activity as *, while activity goups as 16. But the nothing happened when I change a material with material group 17. It seems this auth. obj. is not checked while change material master. Does any idea for this case? How to let the system check this auth. obj.?
    Thanks great.

    HI,
    Adding to what Sudipta has said, you can also use the workbook technique for accomplishing these type of changes. That way you can achieve all hover text changes in one shot across all MA tabs.
    The 2 main tabs in the wokbook to be changed are: 'Localized Resource' and 'UI overrides' tab.
    As an example, suppose you want to add the following text for Master Agreement External Category field:
    "This field is a classification hierarchy to describe the products or services of the event and/or agreement."
    So in the Localized resource tab, fill out the following:
    BUNDLE: custom
    RESOURCE_ID: xxx     
    RESOURCE_KIND: APP_TEXT     
    DEFAULT_VALUE: This field is a classification hierarchy to describe the products or services of the event and/or agreement.
    Then refer the same attributes in the UI Overrides tab:
    UI_ID: contracts.agreement.ui.buyside.default
    FIELD: EXT_CAT
    ATTRIBUTE: Description
    VALUE: Same as Resource ID used in localized resource (xxx above)
    Hope this helps,
    Vikram Shukla

  • Change material master i.e MM02 using BAPI's

    Hi ,
    I need a BAPI which will change material master for changing MRP 2,Accounting 1 and Costing 1  View .
    Please provide me with code if possible .
    Thank you .
    Regards,
    Kumar.

    hi ,
    Use the fm SELECTION_VIEWS_FIND to get the list of active view for a particular materisl.
    The index of each record in the returned table will correspond to the position of that view in the list of views that is displayed in the bdc recording.
    The number of views maintained for a material is listed in field MARA-VPSTA.
    Each Letter in above fields indicate the views maintained. Following is the list.
    A Work scheduling
    B Accounting
    C Classification
    D MRP
    E Purchasing
    F Production resources/tools
    G Costing
    K Basic data
    L Storage
    P Forecasting
    Q Quality management
    S Warehouse management
    V Sales
    X Plant stocks
    for bdc check this,
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bdc%2btutorial
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/new%2bpage
    BDC:
    Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
    Features :
    BDC is an automatic procedure.
    This method is used to transfer large amount of data that is available in electronic medium.
    BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
    BDC uses normal transaction codes to transfer data.
    Types of BDC :
    CLASSICAL BATCH INPUT (Session Method)
    CALL TRANSACTION
    BATCH INPUT METHOD:
    This method is also called as ‘CLASSICAL METHOD’.
    Features:
    Asynchronous processing.
    Synchronous Processing in database update.
    Transfer data for more than one transaction.
    Batch input processing log will be generated.
    During processing, no transaction is started until the previous transaction has been written to the database.
    CALL TRANSACTION METHOD :
    This is another method to transfer data from the legacy system.
    Features:
    Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
    Updating the database can be either synchronous or asynchronous. The program specifies the update type.
    Transfer data for a single transaction.
    Transfers data for a sequence of dialog screens.
    No batch input processing log is generated.
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm

  • BAPI_MATERIAL_SAVEDATA -        Create and Change Material Master Data

    Hi,
    I want to delete a record an EAN record(MEAN table entry) available in addtitional data tab in Basic data in Material master.
    I am making use of the BAPI BAPI_MATERIAL_SAVEDATA -  to delete the record..
    However I am not able to do the same ..,
    Kindly guide me what all details needs to be passed,, to do the same ...
    I cannot delete directly from MEAN table...
    Regards
    Irfan

    Hi,
    Pass the details in the table INTERNATIONALARTNOS of the BAPI.
    Set the deletion indicator field DEL_FLAG to delete teh record.
    What error messgaes are you getting?
    Regards,
    Ankur Parab

  • LSMW FOR MATERIAL MASTER USING BAPI_MATERIAL_SAVEDATA

    Hi Gurus,
    Im trying to develop lsmw for material master upload using bapi method.
    Object:BUS1001006
    BAPI:BAPI_MATERIAL_SAVEDATA
    MESSAGE TYPE: MATMAS_BAPI
    BASIC TYPE : MATMAS_BAPI01.
    I m unable to find parameters to load gross_weight volume and volume unit and also problem loading the custom fields of material master. Any body who has worked on this one, can you please help me.
    Thanks
    venkat

    The BAPI_MATERAIL_SAVEDATA support the gross_weight or the volume via the tables UNITSOFMEASURE and UNITSOFMEASUREX.
    eg.
    UNIT_OF_WT =KG
    ALT_UNIT = PCS
    NUMERATOR = 1
    DENOMINATR =1
    GROSS_WT =1000
    All the customer specific field are supported by the EXTENSIONIN and EXTENSIONINX tables.

  • Problem in updating material master using  FM 'MD_MRP_LEVEL_CHANGE_DATA'

    hi experts,
    i m using this FM 'MD_MRP_LEVEL_CHANGE_DATA' to update the material master for MRP Area related data. i m passing the fields in the FM according to the requirement. when i execute the program it gives a msg
    000I : 000, i m not able to track this msg that what can be the error..........
    and also the changes are not reflected in MM03 transaction.
    and if i m trying to pass the same data directly from SE37 and executing the FM , its running perfectly and changes are reflected in MM03.
    please help me out to get out of this problem.
    points will be rewarded for the correct answer.
    thanks in advance..........
    Manisha

    Manisha,
    Can you please provide the code where u r having problems?
    Thanks
    Ganesh.S

  • Changing material master data: BOM refresh

    Hello everybody!
    I gently ask for a help:
    I have to change frequently procurement type in material master (view "MRP 2")
    How can I, afterwards, refresh the BOM linked to that material, so to have new procurement updated for my production order??
    Thanks very much!!
    Regards
    Chiara

    Thanks,
    so you say even if I change material procurement type, CS12 (base BOM) doesn't see it, but production order does, and prevails. Is that correct?
    My problem is that frequently a material that initially is a direct procurement material (so generating purchase request), may become afterwards a stock material (so not generating purchase requests if a stock is present).
    With CS12, after changing MRP 2 view, I see that material again with direct procurement (F ZN), not changed into sotck (F).
    How can I refresh it?? I have a lot of these types of changes.
    Thanks again for any suggestion
    Chiara

  • Unsolved Problem-Order without Material Master

    Hi all
    My problem is still unsolved. I want to create Sales Order with out Material Master. In Materials Management, we create Purchase orders to vendors with out a Material Master by just typing  description of a material and then assigning Material Group and Cost Centre to that description.
    If it is possible to issue Purchase Orders with out material master, then it is not possible to create sales Order also without material master?
    I got an answer here yesterday to type description in Material description field in SO and use item category TATX. The problem with this is, it allows delivery, but does not allow pricing (pricing setting immediately goes to display mode in item category screen). If I do any other alterations with this item category, then it asks for material number while creating sales order.
    Please help

    Hi,
    I think the for text material pricing is not applicable.Thats why it's not taking.Text material is only for displaying text only.
    Regards,
    Hari.

  • Create Material Master using BAPI_MATERIAL_SAVEDATA - just the basic view

    Hi,
    I want to create new material master ( just the basic view ) using BAPI_MATERIAL_SAVEDATA.
    No error found in the return parameter, but the material was not created.
    Here is my code :
    DATA : ld_headdata LIKE bapimathead,
           lt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
           lt_return_comit LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
           lt_return_cl LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
           ld_datum(10),
           ld_uzeit(10).
    DATA: ld_matdesc LIKE bapi_makt OCCURS 0 WITH HEADER LINE,
          ld_clientdata  LIKE bapi_mara.
    Regards,
    Hary
    ld_headdata-material = 'MATERIAL-01'.
    ld_headdata-ind_sector  = 'M'.
    ld_headdata-matl_type = 'ERSA'.
    ld_headdata-basic_view = 'X'.
    ld_matdesc-matl_desc = 'TEST MATERIAL'.
    ld_matdesc-langu = sy-langu.
    APPEND ld_matdesc.
    ld_clientdata-base_uom = 'PC'.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata                    = ld_headdata
        clientdata                  = ld_clientdata
       clientdatax                 =
      PLANTDATA                   =
      PLANTDATAX                  =
      FORECASTPARAMETERS          =
      FORECASTPARAMETERSX         =
      PLANNINGDATA                =
      PLANNINGDATAX               =
      STORAGELOCATIONDATA         =
      STORAGELOCATIONDATAX        =
      VALUATIONDATA               =
      VALUATIONDATAX              =
      WAREHOUSENUMBERDATA         =
      WAREHOUSENUMBERDATAX        =
      SALESDATA                   =
      SALESDATAX                  =
      STORAGETYPEDATA             =
      STORAGETYPEDATAX            =
      FLAG_ONLINE                 = ' '
      FLAG_CAD_CALL               = ' '
      NO_DEQUEUE                  = ' '
      NO_ROLLBACK_WORK            = ' '
    IMPORTING
       return                      = lt_return
    TABLES
       materialdescription         = ld_matdesc
      UNITSOFMEASURE              =
      UNITSOFMEASUREX             =
      INTERNATIONALARTNOS         =
      MATERIALLONGTEXT            =
      TAXCLASSIFICATIONS          =
      RETURNMESSAGES              =
      PRTDATA                     =
      PRTDATAX                    =
      EXTENSIONIN                 =
      EXTENSIONINX                =
      NFMCHARGEWEIGHTS            =
      NFMCHARGEWEIGHTSX           =
      NFMSTRUCTURALWEIGHTS        =
      NFMSTRUCTURALWEIGHTSX       =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT          =
    IMPORTING
       return        = lt_return_comit

    hi
    Hope it will help you.
    <REMOVED BY MODERATOR>
    REPORT z34332_bdc_create_material .
    data: la_headdata type BAPIMATHEAD,
    la_clientdata type BAPI_MARA,
    la_CLIENTDATAX type BAPI_MARAX,
    la_return type BAPIRET2.
    data: i_materialdescription type table of BAPI_MAKT,
    wa_materialdescription like line of i_materialdescription.
    la_headdata-MATERIAL = '000000000000000004'.
    la_headdata-IND_SECTOR = 'M'.
    la_headdata-MATL_TYPE = 'FERT'.
    la_clientdata-BASE_UOM = 'FT3'.
    la_CLIENTDATAX-BASE_UOM = 'X'.
    la_clientdata-MATL_GROUP = '01'.
    la_CLIENTDATAX-MATL_GROUP = 'X'.
    wa_materialdescription = 'TEST'.
    append wa_materialdescription to i_materialdescription.
    clear: wa_materialdescription.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
    EXPORTING
    headdata = la_headdata
    CLIENTDATA = la_clientdata
    CLIENTDATAX = la_CLIENTDATAX
    * PLANTDATA =
    * PLANTDATAX =
    * FORECASTPARAMETERS =
    * FORECASTPARAMETERSX =
    * PLANNINGDATA =
    * PLANNINGDATAX =
    * STORAGELOCATIONDATA =
    * STORAGELOCATIONDATAX =
    * VALUATIONDATA =
    * VALUATIONDATAX =
    * WAREHOUSENUMBERDATA =
    * WAREHOUSENUMBERDATAX =
    * SALESDATA =
    * SALESDATAX =
    * STORAGETYPEDATA =
    * STORAGETYPEDATAX =
    * FLAG_ONLINE = ' '
    * FLAG_CAD_CALL = ' '
    IMPORTING
    RETURN = la_return
    TABLES
    MATERIALDESCRIPTION = i_materialdescription
    * UNITSOFMEASURE =
    * UNITSOFMEASUREX =
    * INTERNATIONALARTNOS =
    * MATERIALLONGTEXT =
    * TAXCLASSIFICATIONS =
    * RETURNMESSAGES =
    * PRTDATA =
    * PRTDATAX =
    * EXTENSIONIN =
    * EXTENSIONINX =
    write: la_return-TYPE, ',', la_return-MESSAGE.
    clear: la_headdata, la_return, la_clientdata, la_clientdatax.
    Edited by: Alvaro Tejada Galindo on Feb 19, 2008 3:23 PM

  • LSMW FOR MATERIAL MASTER USING BAPI_MATERIAL_SAVEDATA -Adding Custom Fields

    Hi Gurus,
    I'm developing LSMW for Material Master Upload using BAPI method.
    Object:BUS1001006
    BAPI:BAPI_MATERIAL_SAVEDATA
    MESSAGE TYPE: MATMAS_BAPI
    BASIC TYPE : MATMAS_BAPI03.
    There is a requirement to use/map a custom field. Upon research custom field can be added to the parameter EXTENSIONIN and EXTENSIONINX, but I have no Idea on how to do it with LSMW. Please advise what approach is needed.
    Thanks and Regards,
    Jay

    Hi Gurus,
    I got the following code below.
    The custom field won't get updated.... Please advise on what should I do... I've checked different forums and still can't come up with the solution... Please advise..
    REPORT ztest_extend_matmas1.
    STRUCTURE
    TABLES:
    bapimathead, "Headerdata
    bapi_mara, "Clientdata
    bapi_marax, "Clientdatax
    bapi_marc, "Plantdata
    bapi_marcx, "Plantdatax
    bapi_makt, "Material description
    bapiparex, "Extensionstruktur
    bapiparexx,
    bapiret2. "Return messages
    DATA:
    bapi_te_mara LIKE bapi_te_mara,
    bapi_te_marax LIKE bapi_te_marax,
    v_file TYPE string.
    INTERNAL TABLE
    *to store the output data
    DATA:BEGIN OF it_material_number OCCURS 0.
            INCLUDE STRUCTURE bapimatinr.
    DATA:END OF it_material_number.
    *for materialtext
    DATA:BEGIN OF it_materialdesc OCCURS 0.
            INCLUDE STRUCTURE bapi_makt .
    DATA:END OF it_materialdesc.
    *für z-feld
    DATA:BEGIN OF it_bapiparex OCCURS 0.
            INCLUDE STRUCTURE bapiparex.
    DATA:END OF it_bapiparex.
    *für z-feldx
    DATA:BEGIN OF it_bapiparexx OCCURS 0.
            INCLUDE STRUCTURE bapiparexx.
    DATA:END OF it_bapiparexx.
    *to return messages
    DATA:BEGIN OF it_return2 OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA:END OF it_return2.
    DATA:BEGIN OF it_return OCCURS 0.
            INCLUDE STRUCTURE bapiret1.
    DATA:END OF it_return.
    DATA
    lt_messages      TYPE bapiret2_t.
    PROCESSING
    *bapimathead-material = it_material_number-material.
    bapimathead-material = '100-2520'.
    bapimathead-ind_sector = 'P'.
    bapimathead-matl_type = 'AEM'.
    bapimathead-basic_view = 'X'.
    bapimathead-purchase_view = 'X'.
    bapimathead-inp_fld_check = 'I'.
    *bapimathead-BASIC_VIEW = 'X'.
    *bapimathead-SALES_VIEW = 'X'.
    *bapimathead-PURCHASE_VIEW = 'X'.
    *bapimathead-MRP_VIEW = 'X'.
    *bapimathead-FORECAST_VIEW = 'X'.
    *bapimathead-WORK_SCHED_VIEW = 'X'.
    *bapimathead-PRT_VIEW = 'X'.
    *bapimathead-STORAGE_VIEW = 'X'.
    *bapimathead-WAREHOUSE_VIEW = 'X'.
    bapi_mara-matl_group = '0001'.
    bapi_mara-old_mat_no = '100-251'.
    bapi_mara-base_uom = 'ST'.
    bapi_marax-matl_group = 'X'.
    bapi_marax-old_mat_no = 'X'.
    bapi_marax-base_uom = 'X'.
    bapi_marc-plant = '1000'.
    bapi_marcx-plant = '1000'.
    it_materialdesc-langu = 'EN'.
    it_materialdesc-matl_desc = 'DESC'.
    APPEND it_materialdesc.
    *bapi_te_mara-material = it_material_number-material.
    bapimathead-material = '100-2520'.
    *bapi_te_mara-zzforst = '4148'.
    bapi_te_mara-material = '100-2520'.
    bapi_te_mara-zzmar_field1 = '4148'.
    *bapi_te_marax-material = it_material_number-material.
    bapimathead-material = '100-2520'.
    *bapi_te_marax-zzforst = 'X'.
    bapi_te_marax-material  = '100-2520'.
    bapi_te_marax-zzmar_field1 = 'X'.
    it_bapiparex-structure = 'BAPI_TE_MARA'.
    it_bapiparex-valuepart1 = bapi_te_mara.
    APPEND it_bapiparex.
    it_bapiparexx-structure = 'BAPI_TE_MARAX'.
    it_bapiparexx-valuepart1 = bapi_te_marax.
    APPEND it_bapiparexx.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata            = bapimathead
        clientdata          = bapi_mara
        clientdatax         = bapi_marax
        plantdata           = bapi_marc
        plantdatax          = bapi_marcx
      IMPORTING
        return              = it_return2
      TABLES
        materialdescription = it_materialdesc
        extensionin         = it_bapiparex
        extensioninx        = it_bapiparexx
        returnmessages      = lt_messages.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    THanks and Regards,
    Jay
    Edited by: jhayyy on May 17, 2011 6:54 AM

  • Problem related to Material Master?

    Hi All,
    I want that when ever any person creates a new material and on going on Views it shows the particular views which were fixed by us. Please Tell me how can I achive this.

    Hi,
    You can achieve this by way of authorization control. In T.code: PFCG, select your role for creating / changing the material master, Select option Maintenance statuses. Then at change status option select views that you want to give the authorization to the users. Create profile & save the role. Now assign the role to the users. They will get only those views you have selected for them. You have to select those views in all the roles related to material master (create, change, display).
    Regards,
    Biju K

  • Problem:related to material master replication from r3 to srm

    hai everybody,
    hai to all of u my friends....recently i have learned sap srm 5.0..and now i am practicing in my institute from starting configuration with a fresh client.everything has done successfully except replication of material master.while doing material master replications the system throws an error like" product hierarchy has not maintained" and one more error while executing smq2.. like "exception condition :guid forlogsys_changed"raised....thanks in advance

    It seems that the logical system name has been renamed or changed. You need to update the config tables. Fix it using Trx BDLS.
    Regards, IA

Maybe you are looking for