2010 Mar 29 10:55 AM
Hi, I'm trying to do a program to edit gross weight and unit of weight.
I'm trying to do this using BAPI_MATERIAL_SAVEDATA and using the table "unitsofmeasure" to pass the values.
this is the right way to do it?
so far im not being able to chage the material...i dont know why.
here is my code so far: http://www.copypastecode.com/25386/
wa_mara is selected previously from an existing material and I change its gross weigth and unit of weight during the program
a little more information here is the content of returnmessages table when i try to edit the material with matnr = 100000758.
S |M3 |810 |No changes made <
H |MK |102 |Trying to create: 100000758 ____ ____ ____ __________ ____ __ _ _
S |MG |160 |The material cannot be maintained since no maintainable data transferred
H |MK |103 |Trying to create: 100000758 ____ ____ ____ __________ ____ __ _ _
S |M3 |810 |No changes made <
If anyone could tell me what i'm missing i would apreciate, tks
2010 Mar 29 1:16 PM
You must not change the gross weight and its unit in the MARA segment. change it in the MARM segment.
2010 Mar 29 1:57 PM
after a lot of hours, a friend discovered what I was doing wrong.
I was doing:
lt_unitsofmeasurex-alt_unit = 'X'.
lt_unitsofmeasurex-alt_unit_iso = 'X'.
instead of using the actual unit instead of 'X'