Skip to Content

update base quantity by BAPI_MATERIAL_SAVEDATA?

Hi all,

I am trying to update number of fields by BAPI_MATERIAL_SAVEDATA, but only base quantity (MARC-BASMG) is not getting update.

at the same time its getting update manually by MM02. (Work scheduling view > base qty.)

I have passed the value to bapi_marc-base_qty and bapi_marcx-base_qty tables correctly.

Regards,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jun 03, 2015 at 06:18 AM

    Hi Navdeep,

    Try using fm "bapi_transaction_commit" after your BAPI call. This will commit the changes by bapi.
    Hope it helps.

    Regards,
    Pranav.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 03, 2015 at 09:02 AM

    Hi Navdeep,

    For to update BASMG field for material you needs to pass HEADDATA(Material Number) , CLIENTDATA(Material group),CLIENTDATAX,PLANTDATA(Plant,Base qty) and correspond fields in PLANTDATAX.

    I just tried example it's working fine , Do the changes in your program and check.

    Result

    Check in table MARC

    Regards

    Mani


    Add comment
    10|10000 characters needed characters exceeded

    • Hi Nagamani,

      thanks for your response.

      Actually independently its getting update but when I am updating multiple fields (approx. 49 in my case) using this BAPI single time and passing the values to corresponding fields of HEADERDATA, CLIENTDATA,CLIENTDATAX,PLANTDATA,PLANTDATAX. base quantity is not getting update.

      Regards

  • Jun 03, 2015 at 09:05 AM

    Hi Naveen,

    Are you passing all the required key fields for base quantity updation like Plant, purchasing group etc.,? There shouldn't be any problem with HEADERDATA table unless we pass wrong information to BAPI. There are nearly 19 fields present in HEADERDATA parameter. Try to populate most of the fields with the information you have.

    Best Regards,

    Lakshman

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Navdeep,

      Please refer the Long text documentation of HEADDATA present in Import parameters of the BAPI.

      I mean key fields are the one's which you enter in dialog screen of Material Maste while trying to change/create the material

      Best Regards,

      Lakshman

  • Jun 03, 2015 at 12:00 PM

    hi,

    i hope you may forgot to pass the unit.

    With regards,

    sampath kuamr

    Add comment
    10|10000 characters needed characters exceeded