Show TOC

Creating AssociationsLocate this document in the navigation structure

Introduction
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.
Process
You can create an association in one of two ways: using the Association wizard, or 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 (Display-->Change) and then Insert Row (Insert Row) to create a new association. A row will be added.
  5. Do the following in the mass edit view:

    Fields

    To Do

    Name

    Enter a name for the new association in this field.

    Note

    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 an 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

    Label

    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:

    Icons

    Description

    GUI_ICON_INSERT_ROW (Insert Row)

    Click to insert a row as required to add an association

    GUI_ICON_DELETE_ROW (Delete Row)

    Click to delete a row

    GUI_ICON_SORT_UP (Sort Ascending)

    Click to sort the list in ascending order

    GUI_ICON_SORT_DOWN (Sort Descending)

    Click to sort the list in the descending order

    ChangeLayout (Change Layout)

    Click to change the existing layout.

    FullscreenOnOff (View/Hide Tree View)

    Click to hide and unhide the tree view

Result
Once the required details for the new association are entered. Click GUI_ICON_SYSTEM_SAVE (Save ) to save the association. The new Association will appear under the Associations folder in the tree view.
Note 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.