Hi,
You can define the hierarchies with Tcode comm_hierarchy
Go to Find, the default available will be Hierarchy, Press enter
Select the necessary Hierarchy ID, select Choose details or Press Enter
Here you an define hierarchy for product category as per your requirement.
Regards,
Abhishek