Show TOC

Importing Data ModelLocate this document in the navigation structure

Use

The File Import function is developed to allow importing of the data model files defined by external model editors like Visual Studio (edmx files) and the metadata files types (xml) into the Service Builder to create a data model. The files can be imported into the Service builder for the following Project Types:

  • To import a metadata/edmx file for a New project. In instances where you create a project and import a file.

  • To import a metadata/edmx file for an existing project which already has a data model created (re-import). In this case, the existing data model will be overwritten.

Prerequisites
  • For model files with Vocabulary-Based Annotations, the used vocabulary definition should be available in the vocabulary repository maintained in service builder. See Importing a Vocabulary File for more information.

  • If the EDMX file has only the Reference URL for referencing the used vocabulary, then as a pre-requisite the used vocabularies should be imported manually into the data model before the file import. See Adding Vocabulary-Based Annotations to Data Model Artifacts for more details.

  • Ensure that the virus scan profile /SCET/GUI_UPLOAD is Active and selected as Default Profile in the SAP system.

More Information
Importing a Model File - New and Empty Project

This section guides you to import an xml/edmx file into the Service Builder for new (you create a project and then import a model file) and empty project (a project already exists in the Service Builder, but does not have a model file) .

Process

To Import a model file proceed as follows:

  1. Logon to the SAP Gateway system.

  2. Open transaction SEGW.

    The SAP Gateway Service Builder opens.

  3. Create a new project by following the instructions in the Creating a Service Builder Project section

    The Service Builder creates the new project together with an empty folder structure. You can see the newly-created project structure in the tree view in the left-hand screen area.

    Note

    For existing projects, these folders are already available and you have to just proceed with importing the model file.

  4. Right click on theStart of the navigation path Data Model Next navigation step Import Next navigation step Data Model from File End of the navigation path to import a metadata/edmx type file.

    The Wizard Step 1 of 2: File Import page appears.

  5. Select an xmlor edmx file and click Open.

    Note

    When a file other than the xml or edmx type is selected, an error message will display.

  6. On successful import of the xml or edmx file, a message displays confirming the import.

    The OData artifacts available in the imported model file will be populated under the respective folders under the project.

  7. Double click the artifacts to view the details in the mass edit area.

  8. Save the Project.

    Note

    If you do not save your newly-created project, your data will be lost when the Service Builder is closed.

Importing a Model File - Existing Project

This section guides you to import an xml/edmx file into the Service Builder for the projects which already exists and has a model file (re-import).

Process

To import a model file for existing projects proceed as follows:

  1. Logon to the SAP Gateway system.

  2. Open transaction SEGW.

  3. Click Open Project to open an existing project.

    The Open Project window displays in the Service Builder.

  4. Either click the view cluster button or press F4 to view the available projects.

  5. Select the project and click Execute to execute the project.

    The project displays in the Service Builder.

  6. Click Display/Change to edit the project.

    Or

    Right click on the project folder or the Data Model folder and click Change.

    The project is now open for editing.

  7. Right click on the Data Model and in the resulting submenu, select Import Model to import a metadata/edmx type file.

    The Wizard Step 1 of 3: File Import appears.

  8. Click Browse to select and import the xml or edmx file and click Next.

    The Wizard Step 2 of 3: File Import appears.

    The Wizard Step 2 of 3 displays the following statuses for the artifacts:

    Status

    Description

    Edit

    If an artifact is available in both the file and in the Data model, but if the one in the file (file that is being imported) has some changes, then these artifacts will have the status has changed . You can choose to adapt the file changes in the data model. If this option is not selected then the artifact in the data model will remain unchanged.

    New

    If the imported file contains an artifact that is not present in the Data Model, then that artifact will be displayed with the status New . On selecting that artifact, a new entry will be created in the Data model.

    Delete

    If the file does not contain the artifact that exists in the data model, then it will be displayed with Delete status. If you select the artifact, it will be deleted from the data model. If you don't select the artifact, then data model will remain unchanged.

    Equal

    If an artifact exist in both the data model and in the file and if it is equal, then the artifact will be disabled for selection. These artifacts will be displayed with the status Equal

  9. Click Next when you have completed the selections.

    The Wizard Step 3 of 3: File Import page appears. This page displays the preview of the selected artifacts.

  10. Click Go Back to modify your selection.

  11. Click Finish to confirm the selections.

    An OData consistency check is performed on the project to report any OData compliance errors

    The OData artifacts along with the vocabulary annotations available in the imported model file will be populated under the respective folders under the project. Also, any referenced vocabularies will be added to the data model.

    Note

    Annotations supported by SAP Gateway runtime is supported by the File Importer for Project Type Service with Vocabulary-Based Annotations.

Result
  1. On successful import of the xml or edmx file a message displays confirming the import.

    The OData artifacts available in the imported model file will be populated under the respective folders under the project.

  2. Double-click the artifacts to view the details in the mass edit view.

  3. Click Save to save the project.

Activities

You can also perform the following activities in the Service Builder after importing the data model:

More Information

To proceed with the next step, see Editing Properties