Create a Many-to-Many Relationship

Create a many-to-many relationship from a business object's Overview tab. When you create a many-to-many relationship between the Employee and Project business objects, an employee can work on multiple projects, and each project can have many employees.

To create a many-to-many relationship:

  1. Go to your business object's Overview.
  2. Click + Relationship next to Relationships, then select Many to Many.
  3. In the Create Many to Many Relationship dialog, select the business object you want to create a relationship with.

    Because you chose a many-to-many relationship, an intersection business object with two reference fields (in our example, EmployeeProject with the project and employee fields) is automatically created. Its default name is a concatenation of the two business objects (which can be changed if you want). For an intersection business object, you can't deselect the Required checkbox in either of the reference fields.
    Description of bo-relships-mtom.png follows
    Description of the illustration bo-relships-mtom.png

    Tip:

    If an existing business object has many-to-one relationships with both source and target of the many-to-many relationship, the business object will appear in the Select a business object drop-down list. You can use this object instead of creating a new intersection business object.

    The Enable Accessor checkbox is selected by default. Keep it selected unless you want to disable access to the other business object.

  4. Edit the properties of the relationship field (Field Name, Display Label, and Display Field). Whether you can edit a property and what values are available depends on the nature of the relationship and the objects.
  5. Click Create Relationship.
The new relationship is displayed in the Relationships list on the Overview page, along with the accessor that lets you access the business object at the other end of the relationship. Clicking the accessor name will take you to the Fields tab, where you'll see the accessor listed along with other fields.