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 to update characteristics in Material master?

Former Member
0 Kudos

Hi All,

Is there any BAPI to update the characteristics values in the Material master?

I have found some to read the values, but not for updating.

I have the material number, characteristic class and characteristic.

Thank you for your Help.

Monica.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You have to use the Function Module BAPI_OBJCL_CHANGE as mentioned below

CALL FUNCTION 'BAPI_OBJCL_CHANGE'

EXPORTING

objectkey = <Material no with Leading Zeros>

objecttable = "MARA"

classnum = <Material class>

classtype = <Class type, Ex 001, 200.. >

TABLES

allocvaluesnumnew = gi_valuesnum

allocvaluescharnew = gi_valueschar

allocvaluescurrnew = gi_valuescurr

return = li_return.

You have to use BAPI_TRANSACTION_COMMIT, otherwise it wont update in database

4 REPLIES 4

former_member181962
Active Contributor
0 Kudos

YOu have to use the BAPI:

BAPI_OBJCL_CREATE

The OBJECTKEYNEW value should be the material Number.

regards,

Ravi

Former Member
0 Kudos

BAPI_OBJCL_CHANGE

Former Member
0 Kudos

You have to use the Function Module BAPI_OBJCL_CHANGE as mentioned below

CALL FUNCTION 'BAPI_OBJCL_CHANGE'

EXPORTING

objectkey = <Material no with Leading Zeros>

objecttable = "MARA"

classnum = <Material class>

classtype = <Class type, Ex 001, 200.. >

TABLES

allocvaluesnumnew = gi_valuesnum

allocvaluescharnew = gi_valueschar

allocvaluescurrnew = gi_valuescurr

return = li_return.

You have to use BAPI_TRANSACTION_COMMIT, otherwise it wont update in database

0 Kudos

Thank you all for the help. I will begin my testing.

Points were given to all.

Have a great day.

Monica.