Show TOC

Creating AssociationsLocate this document in the navigation structure


An Association is a named relationship between two or more Entities. Association defines a peer-to-peer relationship between participating Entity Types and can support different multiplicities at both the ends. An example of an association is the relationship between the Customer and Order entities. The Service Builder provides the facility to create and edit Associations. This document guides you to create association in the Service Builder.


You can create an association in one of two ways; using the Association wizard, and using the mass edit view.

To create and edit an Association using the mass edit view, proceed as follows:

  1. Open the Service Builder.

  2. Expand the Data Model folder in the tree view of your project.

  3. Double-click the Association folder to open it in the mass edit view.

  4. Click Display-->Change and then Insert Row to create a new association.

    A row will be added.

  5. Do the following in the mass edit view:


    To Do


    Enter a name for the new association in this field.


    An error message displays if you do not enter a name for the association.

    External Association Editor

    Click to create an external association. The term external association refers to creating an association with the entities of the model that has been included in the Service Builder. See Including a SAP Gateway Service for more information.

    Principal Entity

    Enter the name of the Principal Entity, the entity which is being considered for the From Role in the new association.

    Principle Entity Cardinality

    Select a cardinality for the selected principal entity from the drop-down list.

    Dependent Entity

    Enter the name of the Dependent Entity, the entity which is being considered for the To Role in the new association.

    Dependent Entity Cardinality

    Select a cardinality of the Dependent Entity from the drop-down list


    Enter a label for the new association. This label is displayed as the label when the service is consumed.

    Label Text Reference Editor

    To define the label, use the Label Text Reference Editor. The Label Text Reference Editor enables you to enter the reference type,

  6. You can also use additional functions available in the mass edit view as described in the table below:



    Insert Row

    Click to insert a row as required to add an association

    Delete Row

    Click to delete a row

    Sort Ascending

    Click to sort the list in ascending order

    Sort Descending

    Click to sort the list in the descending order

    Change Layout

    Click to change the existing layout.

    View/Hide Tree View

    Click to hide and unhide the tree view

  1. Once the required details for the new association are entered.

  2. Click Saveto save the association.

    The new Association will appear under the Associations folder in the tree view.


Generated services based on BOR and RFC data sources in the Service Builder, support navigation between entities within the same service, and between entities in different services.

To properly handle associations for data sources, make sure that the following is met:

  • A referential constraint has been created for the association.

  • A navigation property is created in the relevant entity.

More Information

To proceed with the next step, see Generating the Service.