2020 Dec 17 9:27 PM
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
2020 Dec 18 6:28 AM
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!
2020 Dec 18 7:16 AM
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