Show TOC Entering content frame

Background documentation Defining Relation Weights Locate the document in its SAP Library structure

Defining the weight of a relationship between business objects allows you to control the path that is used by the unification autocomplete service to compute relations automatically.

By default, a complex relation (one including several intermediate objects) receives a weight equaling the sum of the weight of its link segments. For example, in the diagram below, the relation between objects A and E receives a weight of 40.

This graphic is explained in the accompanying text

In some cases, a relationship between two objects can be defined using two or more different paths. For example, in the diagram below, a relationship between objects A and E can be defined using either Path I or Path II.

By default, Path I will have a weight of 40; Path II will have a weight of 20.

When there are several alternatives for defining a relationship, the autocomplete service optimizes the path selection by choosing the path with the lowest weight. If two paths have an equal weight, autocomplete chooses the shortest path, meaning the path having the least linking objects.

In cases in which there are several path options, you may want to define a path for the relation that is not necessarily the shortest. By modifying the weight of relations between objects in the Weight field in the Single Relation Editor, you can control which path is selected when the relation is completed automatically. Assign a high weight value to the path whose priority you want to lower, since the greater the weight, the less likely that relation path will be used.

This graphic is explained in the accompanying text

For instance, in the above example, Path II is shorter because of a description table used by both objects. However, if you prefer Path I because it is more meaningful in your business context, you can icrease the weight of Path II or decrease the weight of Path I, as you see fit. For example, if you set the weight between objects A to F and/or F to E so that the weight of A to F to E equals 60, you effectively eliminate the selection of Path II. The relation between objects A and E will be completed using Path I.

Leaving content frame