Show TOC

Importing a Data ModelLocate this document in the navigation structure

Introduction
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. This feature can be used in the following scenarios:

  • 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

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

Figure 1: Setting Virus Scan Profile
More Information
Importing a Data Model - New and Empty Project
Procedure

To Import a model file proceed as follows:

  1. Logon to the SAP NetWeaver Gateway system.

  2. Open transaction SEGW.

    The SAP NetWeaver Gateway Service Builder appears.

  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 data model file.

  4. Switch to edit mode.

  5. Right click on the Start 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.

    Figure 2: Data Model-> Import-> Data Model from File
    Note

    For an existing project, an overwrite confirmation window appears. Choose Yes to proceed.

  6. The file browser to Select a model file for import appears.

  7. Select a xml or an edmx file and click Open.

    Note

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

  8. On successful import of the xml or edmx file an message displays confirming the import.

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

    Figure 3: OData Artifacts Loaded
  10. Double-click the artifacts to view the details in the mass edit area.

  11. 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
Procedure

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

  1. Logon to the SAP NetWeaver Gateway system.

  2. Open transaction SEGW.

    The SAP NetWeaver Gateway Service Builder opens.

  3. Click Open Project to open an existing project.

    The Open Project window appears.

    Figure 4: Open Project Window
  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 the change Display-Change button on the tool bar.

    OR

    Right click on Data Model and choose Change.

    The project is now open for editing.

  7. Right click on Data Model and in the resulting submenu, select Start of the navigation path Import  Next navigation step Data Model from File End of the navigation path to import a metadata/edmx type file.

    An overwrite confirmation message displays.

  8. Click Yes to proceed.

    The Select a model file for import window appears.

  9. Select a xml or an edmx file and click Open.

    On successful import of the xml or edmx file an message displays confirming the import.

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

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

  11. Save the Project.

Activities

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