Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_MATERIAL_SAVEDATA How to change gross weight and weight unit ??

Former Member
0 Kudos
343

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

2 REPLIES 2

JL23
Active Contributor
0 Kudos
74

You must not change the gross weight and its unit in the MARA segment. change it in the MARM segment.

Former Member
0 Kudos
74

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'