Question:
Hello sapfans,
We usually run a "Z*" program that extends our hierarchy in CRM. This program gets a file with the new categories and appends them in an internal table. Then it loops into the internal table and calls the function 'COM_PROD_CATEGORY_MAINTAIN' filling the parameters to extend the hierarchy.
The problem has appeared when by mistake we have a blank line in the file. Then the program has created a blank category as the root category and we can not remove it. The rest of categories still exists because we can see them by the 'Open category' function but we can not view them in the hierarchy. It seems that the new blank category "hides" the rest of the hierarchy as a result of its root role.
Could you help us to remove this category? Is it possible to use the function 'COM_PROD_CATEGORY_MAINTAIN' for removing it? If possible please explain us how we can do it.
We have looked for the solution in SAPNotes system and in the documentation but we can not find it
Thanks in advance for your cooperation.
Salut, César
Answer:
You could maintain your category id directly in database table COMM_CATEGORY in order to appear correctly.
Answer:
Hello sapfans, thanks dca,
dca wrote: "You could maintain your category id directly in database table COMM_CATEGORY in order to appear correctly."
Ok dca but.... To maintain the category id in database table may be dangerous, isn't it? Besides... are you sure that if we remove the blank register then the hierarchy will appear correctly? How the system does know what category is the root of the hierarchy after the removal?
Thanks in advance
Answer:
You are right. But you already have an inconsitency in your database.
I didn't say to remove the category from the table. Relations between categories and with hierarchy are kept in the same table but by GUID. So, is no danger if you put something in category_id and see if your category appears.