Show TOC

Deriving a Data Model from an Existing Data ModelLocate this document in the navigation structure

Use

You can create a new data model that is based on an existing data model. You might want to derive a new data model from an existing data model, for example, if you want to add user-specific annotations. If you want to add annotations to a data model, you must create a User-Centric (UC) data model that is based on the existing Public Solution (PS) data model you want to annotate. This is because you cannot annotate a PS data model. You can create more than one UC data model from the same PS data model so that you can include annotations for different users.

Procedure
  1. Start the ABAP Workbench in transaction SE80.

  2. Select SAP GW Data Model from the dropdown list.

  3. Enter a name for the data model you want to create, adhering to the naming convention <name><version><type>, and press Enter

    A message is displayed to inform you that this object does not exist and asks if you want to create it.

  4. Select Yes and the Create Data Model dialog box is displayed:

    Create from Existing Data Model

  5. Enter the Type of data model you want to create, either PS (Public Solution) or UC (User Centric). Version displays as 0001 and cannot be changed.

  6. In Create From, select Existing Data Model.

  7. Find the existing data model on which you want to base the new data model by entering its Name, Type, and/or Version. Input help is available to help you search

  8. Select the green checkmark to continue.

  9. Enter the relevant package name in the next dialog box and choose Save, or Local Object as appropriate.

The data model is created and is displayed in the tree view. The original data model from which you derived the new data model is displayed under Base SAP GW Data Model. You can now edit the new data model and its elements; see Properties Editor and Annotation Editor for more information.

If you already have a data model displaying in the ABAP Workbench tree view, (for example a PS data model from which you want to create a UC data model), a quick creation method is available. Right-click Derived SAP GW Data Models and select Create SAP GW Data Model. The Create Data Model dialog box is displayed with the name, type, and version of the existing data model already entered. You then enter a name and type for the new data model (read-only version of 0001) as described above. The data model is created and added to the Derived SAP GW Data Models folder. You can navigate directly to it using the Display Object List icon in the toolbar. The new derived data model has the original data model as its base data model (displays under Base SAP GW Data Model),to enable you to navigate back to the original data model.

Note

If you try to delete a data model from which other data models have been derived, a message is displayed to warn you of the possible consequences of deleting the base data model.

You can also navigate to related data models and related consumption models in the tree view.

Copying a Data Model

You can copy an existing data model as follows:

  1. Right-click the data model name in the tree view and select Copy from the menu. The Copy Model dialog box is displayed:

    Copy Model Dialog Box

  2. In the Target Model section, enter a name for the new data model. You cannot change the type and version; these stay the same as the base data model.

  3. Select the green checkmark to continue.

  4. Enter the relevant package in the next dialog box and choose Save, or Local Object as appropriate.

  5. The system checks that the data model does not already exist and, if it does not, a message appears at the bottom of the screen informing you that the source data model has been successfully copied to the new data model.