There are several function modules given in the SAP CRM system to extract the product hierarchy tree. One of those...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
that you may want to utilize is COM_HIERARCHY_GETDETAIL_API, which will return all the subcategories present under a hierarchy.Please look for the function group COM_HIERARCHY_API to see the other function modules that might solve your requirements.
Dig Deeper on SAP CRM software