Creating Object Relationship Models
Prerequisites
The object type of an object involved with a relationship must be created in a repository (business object repository or class library).
Procedure
-
Start transaction SOBL_MODEL.
-
If you are not in change mode, choose
.
Create Role Types
-
In the dialog structure, execute the role types entry by double-clicking.
-
To create a new role type, choose New Entries. To change a role type, select it from the list by double-clicking.
-
Make the following settings:
-
Name and desciption of the role type (the name of a role type serves as a key and can no longer be changed)
-
Indicator stating whether the role type should be non-persistent or persistent (also see Persistent Roles).
-
If necessary, the corresponding role type from a relationship model that was used before SAP Technology Release 6.10.
-
-
Choose
and
.
Assign Object Types to Role Types
-
In the list of role types, select the entry to which you want to assign object types.
-
In the dialog structure, execute the object types to role types entry by double-clicking.
-
To assign new object types, choose New Entries. To change an assignment, select it from the list by double-clicking.
-
Make the following settings:
-
The role type that you selected.
-
The object type with objects that can take this role type in a relationship.
-
The repository in which the object type was created.
-
If necessary, the corresponding object type from a relationship model that was created before SAP Technology Release 6.10.
-
-
Choose
and
.
Create Relationship Types
-
In the dialog structure, execute the relationship types entry by double-clicking.
-
To create a new relationship type, choose New Entries. To change a relationship type, select it from the list by double-clicking.
-
Make the following settings:
-
Name of the relationship type
-
Both role types that are to be related (A and B)
-
The cardinality with which the relationships can occur (that is, how many object instances in the relevant role can be related with the object instances in the related role).
-
Table in which the relationship records should be saved at runtime
-
Name of the person who is responsible for relationships of this type
-
Description of the significance of the relationship (there you can differentiate the direction in which the relationship is seen)
-
If necessary, the corresponding relationship type from a relationship model that was used before SAP Technology Release 6.10.
-
-
Choose
and
.
Assign Application-Specific Attributes
-
If you additionally use application-specific attributes for relationships of a type, proceed as follows:
-
In the list of relationship types, select the entry to which you want to assign relationship types.
-
In the dialog structure, execute the relationship attributes entry by double-clicking.
-
To create a new relationship attribute, choose New Entries. To change a relationship attribute, select it from the list by double-clicking.
-
Make the following settings:
-
Name of the attribute
-
Class in which the attribute is encapsulated (the class must be persistent and have implemented the IF_BINREL_PROP_CA interface). For more information, see Application-Specific Attributes for Relationships.
-
Name of the person who is responsible for relationships of this type.
-
-
Choose
and
.
|
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 attributes |
TRANSPASS, table type attribute, which is included in the CL_OBL_EXMPL_TRANSPASS class VIAPROP, flat attribute, which is included in the CL_OBL_EXMPL_PVIA class |
|
Archiving object |
SOBL_SFLIG |