Show TOC Start of Content Area

Procedure documentation Activating Relationships for Business Objects  Locate the document in its SAP Library structure

Use

Business object types can be linked to other business object types using an object-to-object relationship, and can then use the target transactions of the other business object types as well.

You have the following options for simulating this type of relationship:

·        Activate object attributes

·        Simulate an object-to-object relationship using the search help attachment for the target transaction

Activating Object Attributes

This method of implementing object-to-object relationships is useful in scenarios where the parameters of the target transaction can be uniquely set using the source instance. An example is when the “source instance” delivery no. 4711 is dragged to the target transaction Display customer. To implement this scenario, you first have to maintain an object-to-object relationship between the business object types Delivery (source side) and Customer (target side).

You can only do this if the business object types have already been linked to each other using an appropriate attribute in the Business Object Repository (BOR).

If an object-to-object relationship is maintained using this method, all the target transactions assigned to the business object type on the source side (Customer) are available for the drag-enabled screen fields assigned to the business object type on the target side (Delivery). The object-object relations are transient in this case; that is, if the relationships A ® B and B ® C exist, then there is also a relationship A ® C.

Prerequisites

·        The appropriate object attributes must be implemented in the BOR for the relevant object relationships.

·        Use of multi-value attributes is not allowed because the action performed with Drag&Relate must be unambiguous.

This applies for the current Drag&Relate implementation at least, and does not exclude the possibility of multi-value object-to-object relationships in the future.

·        Only relationships between Drag&Relate-enabled business object types are supported.

Procedure

...

       1.      Start Transaction SPO0.

       2.      To change the definition of an existing object type, choose the relevant object type in the Object type field using the F4 help or by typing the exact name in this field.

       3.      Choose Display to the left of the field.

       4.      Switch to change mode by choosing Display/change.

       5.      Choose the Object relations tab. The corresponding relationships to other objects are displayed for the attributes that are implemented on the chosen business object type.

On the Object Relations tab, you can set a priority for each attribute of an object. This is a numeric value, where 1 represents the highest priority. This priority setting specifies which attribute is used for the query.

Note

Some business objects can produce more than one value for a Drag&Relate query, depending on the precise attribute concerned. When the user submits a query based on an object that can return more than one result, the portal needs to know which attribute to use to return the correct result. The user specifies in their personalization settings whether a dialog allows them to select the attribute to be used or whether they want the system to use the attribute with the highest priority.

Example

An order number is dragged and related to the customer address data. In this case, the intended address could be the address of the ordering party (such as the company’s head office) or the delivery address (such as a plant in a different location).

       6.      Activate the object relationships that you consider useful by selecting the corresponding column.

       7.      Save your entries.

Result

You have activated relationships for business objects.

If you have finished maintaining the object metadata, you can continue by activating the metadata.

 

End of Content Area