Show TOC

Defining Node RelationshipsLocate this document in the navigation structure

Use

Once you enter this step in the roadmap, all the nodes that you have previously selected and defined are listed on the same level. You arrange the nodes in a hierarchical structure by defining relations between the nodes, either as a composition within the search object connector model or as an association to other models in the same software component.

Note

An association defines a relationship between nodes in different object models. In contrast, a composition defines a relationship between nodes in the same object model.

Associations and compositions form a network of nodes. This network of nodes is used during the assignment of response attributes and request attributes that belong to other nodes. Authorization paths also use the network of nodes.

In either case, the link between the nodes is defined by their foreign keys. The system uses the identical names of the node attributes to generate a proposal for the foreign key description.

Note

To be able to search for SAPscript long texts, you must create an association between your model and the LONGTEXT node of the ESH_SAPSCRIPT_TEXT model. For more information, see Enabling Searching in Long Texts.

Procedure

Defining Compositions

  1. Select the superordinate node under which you want to define a child node.

  2. Choose Create Composition. An additional row is displayed in the table.

  3. In the lower list in the window, choose the node that you want to define as the subordinate node.

  4. Define the properties of the composition:

    1. Assign a cardinality to the child node:

      Arbitrary: 0..n- the child node can have an arbitrary number of instances below the parent node.

      Up to one: 0..1- the child node can have a maximum of one instance or none at all below the parent node.

      Exactly one: 1..1- the child node must have exactly one instance below the parent node.

      At least one: 1..n- the child node must have at least one instance under the parent node.

      The system automatically assigns an inverse cardinality of exactly 1 to the subordinate node.

      For compositions in models that are based on master data DataSources and used for operational data provisioning, the following rules apply when defining the cardinalities:

      From Node Type

      To Node Type

      Cardinality

      Inverse Cardinality

      (cannot be changed; assigned automatically by the system)

      Time-independent master data attributes

      Time-independent master data attributes

      Arbitrary

      Exactly 1

      Time-independent master data attributes

      Language-independent texts

      Exactly 1

      Exactly 1

      Time-independent master data attributes

      Language-specific texts

      Arbitrary

      Exactly 1

      Time-specific master data attributes

      Language-independent texts

      Exactly 1

      Exactly 1

      Time-specific master data attributes

      Language-specific texts

      Arbitrary

      Exactly 1

      Note

      Cardinalities that do not comply with these rules are not taken into account for operational data provisioning.

    2. Optional: Select the checkbox in the Subquery if you want to use 1:n search queries in the details view of a search hit. You can then start further search queries from the table in the details view.

  5. Define the foreign-key relations for the child node.

    Note

    If there are attributes with identical names in the parent node and child node, the system assigns them to each other automatically.

    1. Select the child node for which you want to define the foreign-key relations in the node structure in the part of the screen.

      If there is no system proposal or the system proposal is incomplete, choose the Create button to insert a row in the table for the foreign-key dependency.

    2. Click into the Attributes of Parent Node ' <parent_node_name>' column in the lower screen area, Details: Foreign Key of the Key ' <node_name>', and choose F4 to display the available attributes for the parent node.

    3. Select an attribute from the list.

      Note
      • Note that attributes for time fields or language-key fields (such as DATETO, DATEFROM, LANGU), for which you have defined the corresponding semantic in the Model Nodes step may not be part of the foreign-key dependency.

      • Note the following for foreign-key dependencies for temporal joins:

        • The key fields of the node for master data attributes apart from the DATETO-type field are part of the join condition with the Equals join operator.

        • There are two join conditions for the date field of the node for transaction data:

          One condition in which the date field is equal to or greater than the DATEFROM-type field

          One condition in which the date field is equal to or less than the DATETO-type field

    4. Click into the Attributes of Child Node ' <child_node_name>' column and choose F4 to display the available child node attributes.

    5. Select a matching attribute from the list. It must have the same type as the selected parent attribute. The target node attribute can be longer than the source node attribute but not the other way round. If the selected attributes are not compatible, the system issues an error. If the two attributes have different lengths, the system issues a warning.

Note

You can delete a defined composition by selecting the relevant child node and choosing Delete. In this way, the structure information defined is deleted, but not the node itself. You can remove nodes only in the Define Nodes step of the roadmap.

Adding Associations

  1. Select a node from the node structure. This may be the root node or a child node.

  2. Choose Create Association. An additional row is displayed in the table.

  3. In the lower list in the window, choose the target node within this template, on the basis of which you want to define an association.

  4. Define the association properties:

    1. Enter a unique name for the association.

      Note
      • You can create an association between the nodes in two different models in either of the affected models. The association appears in both models.

      • Associations within a software component must have unique names. When you create an association, the system generates a name for it automatically.

        In the case of BW DataSources as a data source, this can cause errors if the DataSource contains several fields that reference the same master data (for example, sending cost center and receiving cost center, which both reference cost centers). Errors can occur if you create more than one association for the node that represents the reference characteristic. To create more than one association with different foreign-key dependencies but to the same node, you must ensure that the name of each of these associations is unique. Therefore, you always change the name of the association just created in the Association column, for example by adding a suffix.

      • Only one association is permitted for a specific foreign-key dependency.

    2. Assign a cardinality to the child node (for the values, see the Defining Compositions section above).

      For associations in models that are based on DataSources and used for operational data provisioning, the following rules apply when defining the cardinalities:

      From Node Type

      To Node Type

      Cardinality

      Inverse Cardinality

      Any node

      Time-independent master data attributes

      Exactly 1

      Arbitrary

      Any node

      Time-specific attributes

      Arbitrary

      For temporal joins: Up To One or Exactly One

      Arbitrary

      Any node

      Language-independent texts

      Exactly 1

      Arbitrary

      Any node

      Language-specific texts

      Arbitrary

      Arbitrary

      Note

      Cardinalities that do not comply with these rules are not taken into account for operational data provisioning.

    3. Assign a reverse cardinality to the child node.

      The cardinality in the perspective from parent node to child node can differ from that in the perspective from the child node to the parent node.

      Example

      A material that is associated with one plant while the same plant is associated with more than one material.

    4. Select the checkbox in the Detail UI column if you want attributes of this node to be displayed in the detail area of the Search UI. The use of this property depends on the application using Embedded Search.

  5. Define the foreign-key relations for the associated nodes.

    Note

    If there are attributes with identical names and types in the associated nodes, the system assigns them automatically.

    1. Select the assigned node for which you want to define the foreign-key relations in the node structure in the part of the screen.

      If there is no system proposal or the system proposal is incomplete, choose the Create button to insert a row in the table for the foreign-key dependency.

    2. Click into the Attributes of Parent Node ' <parent_node_name>' column in the lower screen area, Details: Foreign Key of the Key ' <node_name>', and choose F4 to display the available attributes for the parent node.

    3. Select an attribute from the list.

      Note
      • Note that attributes for time fields or language-key fields (such as DATETO, DATEFROM, LANGU), for which you have defined the corresponding semantic in the Model Node step may not be part of the foreign-key dependency.

      • Note the following for foreign-key dependencies for temporal joins:

        • The key fields of the node for master data attributes apart from the DATETO-type field are part of the join condition with the Equals join operator.

        • There are two join conditions for the date field of the node for transaction data:

          One condition in which the date field is equal to or greater than the DATEFROM-type field

          One condition in which the date field is equal to or less than the DATETO-type field

    4. Click into the Attributes of Child Node ' <child_node_name>' column and choose F4 to display the available child node attributes.

    5. Select a matching attribute from the list. It must have the same type as the selected parent attribute. The target node attribute can be longer than the source node attribute but not the other way round. If the selected attributes are not compatible, the system issues an error. If the two attributes have different lengths, the system issues a warning.

  6. To move to the next step in the roadmap, choose Next.

    More information: Defining Model Queries