Working With Class Hierarchies

Objective

After completing this lesson, you will be able to work with class hierarchies.

Class Hierarchies

Hierarchy Overview

Up to now, you have created all product classes at the same level. The classes exist in the system without a connection to each other.

However, you can set up a hierarchical structure for classes. This offers several advantages, which we will explore in this lesson.

A hierarchy that is set up carefully makes finding a suitable class, and therefore the object you are looking for, easier.

With hierarchies, you can:

  • Create any number of levels and any number of classes on each level.
  • Build the classes on one level, side by side, in the system, or embed them in a hierarchical structure.
  • Create a simple cross-class search or for characteristic inheritance.

Setting Up a Hierarchy

The following video introduces two scenarios for building a hierarchy.

To create a class hierarchy, you can either:

Example of a class hierarchy in a software interface. It shows the upper screen area with initial class functions, a class list (ALV) with various functions, and an overview tree with drag-and-drop capabilities and additional functions like details, characteristics, class assignment/creation, and delete assignment..

To create a class hierarchy, you can work with either the transactions shown in the previous video, or with the appropriate transaction for the class hierarchy. The second option gives you a graphical interface that you can use to create, change, or delete objects, as shown in the following video.

Hierarchy Without Inheritance

In a class hierarchy without inheritance, no characteristics are assigned to the superior classes, as the following image shows.

A chart of a forklift's components is shown, detailing the assemblies, drive types (diesel and electric), and lift frame specifications (mast height, fork length, and tonnage capacity). The chart includes specific performance metrics for each drive type and lift frame.

Only the classes on the bottom level of the hierarchy have characteristics that describe assigned objects.

Hierarchy With Inheritance

In a class hierarchy with inheritance, the superior classes have characteristics, which are inherited by its subordinate classes.The image below shows an example.

A hierarchical diagram shows the classification of assemblies for forklifts, bicycles, electric forklifts, and diesel forklifts. Each category includes specific details such as internal key, manufacturer, DPI, and price class for items DT-01, DT-05, and DT-07.

To add a characteristic to all classes in a sub-tree of a hierarchy, you only need to enter it once, in the superior class, not for each individual class.

There is no difference between hierarchy classes and classes with objects assigned to them.

Class Hierarchy: Restricting Values

When you set up a class hierarchy, you can restrict the allowed values of a characteristic from one level of the hierarchy to the next. To do this, you use the value assignment screen in transactions "classes to superior classes" and "objects/classes to class" (CL22N and CL24N).

TA hierarchical diagram categorizes fasteners by length. Fasteners (length 1-100) are divided into wood screws (length 1-80) and metal screws (length 50-100). Wood screws are further divided into Wood screws A1 (length 1-40) and Wood screws A2 (length 41-80).

When you set up a class hierarchy, the single-value attribute maintained in characteristics is irrelevant.

Characteristic Length can be restricted on any level of the hierarchy to a certain range of allowed values. In subordinate classes, you only see the restricted allowed values.

The following video shows how to find objects inside the initial class of a hierarchy with a step by step reduction of characteristic values.

Class Hierarchy: Subordinate Classes

In the previous scenario, you restricted the characteristic values within the initial class.

But suppose you want to apply this scenario to a class hierarchy. Inside a hierarchy, you can cannot extend the characteristic values; you can only restrict them further.

The following video explains subordinate classes within class hierarchies.

Hierarchy Network

You can set up a hierarchy network, where a class can have multiple superior classes. The image below shows an example.

A hierarchical diagram of forklift parts, focusing on batteries. It shows two battery models, LW-03 and LW-05, with details on manufacturer, price class, and capacity..

You can use different search paths to find your class.

The value assignment screen shows the characteristics of all superior classes.

Inheritance Advantages and Disadvantages

Rebuilding a normal class and its characteristics is easy. Rebuilding a class hierarchy is a bit more difficult. So you may want to remove a class from a hierarchy. To make this decision, consider what to do with:

  • The classified objects.
  • The characteristics of the class.

The following video presents some factors for making this decision.

How to Work with Class Hierarchies

Now that more and more areas are using classification, the number of classes has become too large to manage easily. For this reason, you want to structure the classes hierarchically.

In addition, some characteristics are required for entire groups of classes. For this reason, you decide to test characteristics inheritance in SAP classification.

Task 1: Create a Class Hierarchy

The following video shows how to set up a class hierarchy with one superior class and three sub classes.

Task 2: Class Hierarchy Reporting and Reclassification

The following video shows the use of a class hierarchy reporting function to check whether the hierarchy has the structure you require. At the end a reclassification of your materials is also shown.

Task 3: Find Objects Inside a Hierarchy and Connect the Hierarchy to Another One

For the final task, the following video demonstrates how to conduct an object search and connect a hierarchy to a larger one, which exists in your system.

Log in to track your progress & complete quizzes