Purpose of this page is to provide useful information about SCM APO Hierarchies.
Hierarchies are structures of business objects. Mostly used for Spare Parts Planning and other functions in SCM.
/N/SAPAPO/RELHSHOW - Change/Display Hierarchies
/N/SAPAPO/RELHDELETE - Delete Hierarchies
/N/SAPAPO/PROD2BOD_M - Assign and Unassign Product to BOD
/N/SAPAPO/PROD2BODDISP - Display Assignment-> Products to BOD
/N/SAPAPO/PROD2RGP_M - Assign and Unassign Product to Regpt
/N/SAPAPO/PROD2RGPDISP - Display Assignment-> Products to RGP
/N/SAPAPO/BOD001 - Maintain BOD
Hierarchy Tables explanation:
Tables names are available with F4 help in SE11: /SAPAPO/REL*
Hierarchy Headers (Names and RELIDs together) are stored: /SAPAPO/RELDSTR
Based on the RELID you can find the hierarchy's nodes in the respective DB table where the hierarchy structure points to.
Let’s take an example of the BOD relations table: SE11 - /SAPAPO/RELDHBOD
These 3 fields make a record unique. In case of BOD – as it is a location hierarchy – you can find the /SAPAPO/LOC-LOCID attributes in the Node ID fields.
Let’s have an example for a simple hierarchy from the database:
The above hierarchy looks like this as an illustration:
Hierarchy structures customization:
You can change existing or create new hierarchy structures on the following SPRO path: "SCM Basis" > "Master Data" > "Hierarchy" > "Maintain Hierarchy"
You are able to define structure types, hierarchy levels or even set up unlimited levels here.
When setting up ''Extended Hierarchy'' type for custom entries, pay attention to the Edge Table, where the hierarchies are saved to.
E.g. in case of ''Extended Hierarchy'' for Locations use the /SAPAPO/RELEHLOC instead of /SAPAPO/RELDHLOC. /SAPAPO/RELDHLOC is applicable to "Hierarchy" type.
SAP Help portal link:
SAP standard restrictions for BOD. The Bill of Distribution is a 'restricted' type of location hierarchy only used by SPP. Restrictions are:
- A BOD can no longer be changed if a Product is assigned to it (in the past)
- A BOD cannot be Deleted if a Product is assigned.
- A Product assignment cannot be removed if in the past.
The above restrictions quite likely make it impossible to change these location hierarchies once already in use. Changes will translate to creating new BOD-s.
The database table which holds the BOD + product assignment pairs is /sapapo/matsbod. The parent-child edges (in this case missing) are stored in /sapapo/reldhbod. <-- misisng data = inconsistency
The hierarchy headers (BOD also, with name, ID, etc..) are stored in /sapapo/reldstr.
SAP standard does not allow to change the content of DB table /sapapo/reldhbod, if corresponding entries in /sapapo/matsbod exist.
SAP Help: Bill of Distribution
Planning Product hierarchy can be created via Cross Interface function if the requirements of the ''Integration'' section of SAP Help SAP Help Planning Product are met.
The respective program path is:
(ECC side: CIF_PPR_SEND)
PDS (Product Data Structure) hierarchies are created through inbound function module:
BAdi / User exit: SE18: /SAPAPO/RELH - interface /sapapo/if_ex_relh > it is called in class (SE24) /SAPAPO/CL_RELH_UI_MAINTAIN - method ADD_OBJECTS_TO_HIERARCHY
Related SAP Notes/KBAs:
2254168 - BOD UI Performance Issue while displaying Bill of Distributions
1711008 - Message /SAPAPO/MAT240 when entering a product in /SAPAPO/RELHSHOW
1637122 - Hierarchy is not displayed in the F4 help
1637128 - Managing objects in product hierarchies
1624714 - Planning product hierarchy not automatically assigned to model 000 during CIF
1577401 - Planning Product missing in transaction /sapapo/relhshow
1765645 - Multiple assignment of different models to a single Hierarchy
1669699 - How to create location product hierarchy