Application Development and Automation 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: 
Read only

BAPI_OBJCL_CREATE Not creating Material classification

sri6666
Active Participant
3,672

Hi Experts,

I am using BAPI_OBJCL_CREATE for creating classification for material. While executing this bapi i am getting "Assignment is exist and valid " and similar kind of errors. Help me with any other Bapis should check before BAPI_OBJCL_CREATE bapi.

Can some one help me

2 REPLIES 2
Read only

former_member1716
Active Contributor
0 Kudos
2,173

sri6666

Recommend you to first go through the functional documentation of the BAPI as pointed below:

Also Try using the CLAF_CLASSIFICATION_OF_OBJECTS

Regards!

Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
2,173

Hello sri6666

First, the function BAPI_OBJCL_CREATE is to create a class, not a classification. A class is a master data object that you can create with CL02. A classification is an assignment of an object e.g. material master to a class together with characteristics' values.

If you intend to create classification e.g. to classify a material, you should use BAPI_OBJCL_CREATE_KEY function.

Both BAPI_OBJCL_CREATE and BAPI_OBJCL_CREATE_KEY create class and classification respectively if they don't exist already.

The error you get clearly shows that you try to create an object that already exists. In that case you should change not create and use BAPI_CLASS_CHANGE or BAPI_OBJCL_CREATE_KEY to change a class or a classification respectively. Also consider using the functions BAPI_CLASS_EXISTENCECHECK and BAPI_OBJCL_EXISTENCECHECK_KEY to check the existence of a class or a classification respectively.

Last but not least, take your time to familiarize with the documentation of the functions.

Best regards

Dominik Tylczynski