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: 

How to change gross weight and weight unit using BAPI_MATERIAL_SAVEDATA

Former Member
0 Kudos
294

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/|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

If anyone could tell me what i'm missing i would apreciate, tks

Edited by: RagnaRock on Mar 29, 2010 10:34 AM

2 REPLIES 2

Former Member
0 Kudos
78

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 <

0 Kudos
78

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'