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 Material Classification

Former Member
0 Kudos
3,699

Hi Experts,

Now my requirement is update material classification.

Using  bapi 'BAPI_OBJCL_CREATE'  to create class and characteristic value for given material. But again i am using same material and same class and different characteristic value it is showing error message 'Assignment exists and is valid' .

Any one tell me bapi to insert new characteristic value for existing class in material classification.

I also tried bapi 'BAPI_OBJCL_CHANGE' it is overwriting existing characteristic value in material classification for given class.

Please help!

Appreciate your help!!

Thanks,

Sivaji.

6 REPLIES 6

reachdebopriya
Active Participant
0 Kudos
894

Hi Shivaji,

Try this    

CALL FUNCTION 'BAPI_OBJCL_CREATE'

      EXPORTING

        objectkeynew    = lv_matnr

        objecttablenew  = 'MARA'

        classnumnew     = lv_classnum

        classtypenew    = '001'                       " mat class

      TABLES

        allocvaluesnum  = ialloc_num

        allocvalueschar = ialloc_char

        allocvaluescurr = ialloc_curr

        return          = ireturn.

Check this below links,,,,

http://scn.sap.com/message/2973707#2973707

http://scn.sap.com/message/4787620#4787620

http://scn.sap.com/message/4493062#4493062

Regards,

Debopriya Ghosh

0 Kudos
894

Hi Debopriya,

Thanks for your replay.

I have already use this bapi. For already existing class it is showing 'Assignment exists and is valid' error message.

I also tried bapi 'BAPI_OBJCL_CHANGE' it is overwriting existing characteristic value in material classification for given class.

Thanks,

Sivaji.

0 Kudos
894

Hi Shivaji,

Can you please check this below link...

http://scn.sap.com/thread/3205276

If you error persists... please send me the code so that I can rectify the issue....

Regards,

Debopriya Ghosh

Former Member

Former Member

Former Member
0 Kudos
894

Hello sivaji,

you can use function module VC_I_GET_CONFIGURATION.

Thanks ,

RK