Start of Content Area

Procedure documentation Creating an Object Relationship Model  Locate the document in its SAP Library structure

Prerequisites

The object type of an object involved with a relationship must be created in a repository (business object repository or class library).

Note

If the the old relationship service has already been integrated in your application, you can create the old model data to a new model, choose the Migration of old model data symbol.

Procedure

Note

Do not extend or re-use roles without first contacting those persons responsible.

  1. Call the transaction SOBL_MODEL.
  2. If you are not in change mode, choose This graphic is explained in the accompanying text.

Creating role types

  1. In the dialog structure, execute the role types entry by double-clicking.
  2. To create a new role type, choose New Entries. To change a role type, select it from the list by double-clicking.
  3. Perform the following settings:
  1. Choose This graphic is explained in the accompanying text and This graphic is explained in the accompanying text.

Assign object types to role types

  1. In the list of role types, select the entry to which you want to assign object types.
  2. In the dialog structure, execute the object types to role types entry by double-clicking.
  3. To assign new object types, choose New Entries. To change an assignment, select it from the list by double-clicking.
  4. Perform the following settings:
  1. Choose This graphic is explained in the accompanying text and This graphic is explained in the accompanying text.

Creating relationship types

  1. In the dialog structure, execute the relationship types entry by double-clicking.
  2. To create a new relationship type, choose New Entries. To change a relationship type, select it from the list by double-clicking.
  3. Perform the following settings:
  1. Choose This graphic is explained in the accompanying text and This graphic is explained in the accompanying text.

Assigning application-specific attributes

  1. If you additionally use application-specific attributes for relationships of a type, proceed as follows:
  2. In the list of relationship types, select the entry to which you want to assign relationship types.
  3. In the dialog structure, execute the relationship attributes entry by double-clicking.
  4. To create a new relationship attribute, choose New Entries. To change a relationship attribute, select it from the list by double-clicking.
  5. Perform the following settings:
  1. Choose This graphic is explained in the accompanying text and This graphic is explained in the accompanying text.

 

Example

Flight model with transit flights and connecting flights:

Model parameter

Value

Role type

TRANSIT, CONNECT, non-persistent role types

Object type for role type

SFLIGHT (for TRANSIT and CONNECT)

Relationship type

FLIGHTCONN ,

Application table SFLIBREL ,

Attributes available

Semantics: Has connecting flight, is connecting flight of

Relationship attribute

TRANSPASS, table type attribute, which is encapsulated in the CL_OBL_EXMPL_TRANSPASS class

VIAPROP , flat attribute, which is encapsulated in the CL_OBL_EXMPL_PVIA class

Archiving object

SOBL_SFLIG