06-02-2015 11:00 AM
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,
06-03-2015 7: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.
06-03-2015 7:55 AM
Hi Pranav,
I have already used "bapi_transaction_commit" after BAPI_MATERIAL_SAVEDATA.
Can you suggest what values should be passed in table HEADDATA that passed to BAPI_MATERIAL_SAVEDATA for mass updation?.
Regards
06-03-2015 8:07 AM
Hi Navdeep,
According to my knowledge BAPI_MATERIAL_SAVEDATA. wont allow mass updation. You can try calling the bapi in loop. Try to find some related threads on scn.
regards,
Pranav.
06-03-2015 8:15 AM
Hi Pranav,
actually I am updating approx. 49 fields using BAPI_MATERIAL_SAVEDATA and all are getting update except Base quantity (BASMG). although I am passing its value same way like others.
I wonder there may be some issue with HEADERDATA table .
Regards
06-03-2015 9:19 AM
Hi,
Are you definitely passing the correct value? Have you checked if that field has a conversion function attached to it?
Cheers,
G.
06-03-2015 10: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
06-03-2015 11:11 AM
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
06-03-2015 10: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
06-03-2015 11:06 AM
Hi Lakshman,
can you tell me what are the required key fields for base quantity updation?
Regards
06-03-2015 11:33 AM
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
06-03-2015 1:00 PM
hi,
i hope you may forgot to pass the unit.
With regards,
sampath kuamr