Wednesday, February 15, 2017

Changing or removing set types and attributes in SAP CRM On-Premise

Attributes and set types are an easy way to add additional characteristics to your product master.

In this blog we assume that you are already familiar with creating set types and attributes but that you run into issues when you want to remove or change an existing set type.

For those who are not familiar with set types and attributes a short introduction: 
Set types and attributes can be maintained via the transaction COMM_ATTRSET in CRM.
First you create your attributes which are then grouped in a set type. The set type is then assigned to a product category via transaction COMM_HIERARCHY and the attributes become available in your product master.

But once you have defined a set type in a particular way and it is being used, it cannot simply be changed. And that is where this blog will give you some useful tips.

Changing or deleting a set type

If a set type is already assigned to a product category, it is only possible to change the set type description and/or to add new attributes. You can no longer remove attributes from a set type which is already assigned to a product category. And a set type can only be deleted if it is not assigned to a product category.

In the screenshot below you see the error message when you open a set type in edit mode and the option to delete an attribute is greyed out.

So if you want to remove an attribute from a set type or if you want to remove a complete set type then you first need to make sure that the set type is not in use. To do this you need to remove the set type from the category in the product hierarchy. Removing a set type from the category in the hierarchy however, is only possible when the set type is not used by any products.

Step by Step  

Step 1. Make sure the set type is no longer referenced to any product. To do this you can run program COM_SETTYPE_DELETE_VALUES for the specific set type.
Before you start the program COM_SETTYPE_DELETE_VALUES via transaction SE38 first you have to make sure that you are registered in table COMC_PR_TOOL_REG by adding an entry to this table via transaction SE16.

  • USER_NAME - User with which you are logged on
  • EXEC_DATE - Date on which you would like to run this report

If you are not registered in this table you will probably get the following error message when you start the program COM_SETTYPE_DELETE_VALUES.

After registering yourself in the table, run the program COM_SETTYPE_DELETE_VALUES. Select your set type, in our case ZBLOG, and remove the entries.
Step 2. Remove the set type from the category in the product hierarchy. This can be done via the transaction COMM_HIERARCHY. Go to the product category and remove the set type from the ‘Set Types’ tab.

Step 3. Change or remove your set type. When you open your set type via transaction COMM_ATTRSET you will see that you no longer get the error message if you try to change anything and the option to remove an attribute is active.


No comments:

Post a Comment