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:
Service with SAP Annotations
Service with Vocabulary-Based Annotations
Annotation Model for Referenced Service
See Creating a Service Builder Project for more details.
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.
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.
For more information on Virus Scan Profile, see http://help.sap.com/saphelp_nw70/helpdata/en/ae/ad1640033ae569e10000000a155106/frameset.htm.
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) .
To Import a model file proceed as follows:
Logon to the SAP Gateway system.
Open transaction SEGW.
The SAP Gateway Service Builder opens.
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.
For existing projects, these folders are already available and you have to just proceed with importing the model file.
Right click on the
to import a metadata/edmx type file.The Wizard Step 1 of 2: File Import page appears.
Select an xmlor edmx file and click Open.
When a file other than the xml or edmx type is selected, an error message will display.
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.
Double click the artifacts to view the details in the mass edit area.
Save the Project.
If you do not save your newly-created project, your data will be lost when the Service Builder is closed.
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).
To import a model file for existing projects proceed as follows:
Logon to the SAP Gateway system.
Open transaction SEGW.
Click Open Project to open an existing project.
The Open Project window displays in the Service Builder.
Either click the view cluster button or press F4 to view the available projects.
Select the project and click Execute to execute the project.
The project displays in the Service Builder.
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.
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.
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 |
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.
Click Go Back to modify your selection.
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.
Annotations supported by SAP Gateway runtime is supported by the File Importer for Project Type Service with Vocabulary-Based Annotations.
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.
Double-click the artifacts to view the details in the mass edit view.
Click Save to save the project.
You can also perform the following activities in the Service Builder after importing the data model:
Make the required changes to the artifacts in the Service Builder.
For more information, see Defining a Data Model.
Include a different SAP Gateway Service and create an Association.
For information, see Including an OData Service.
Import entities from a data source to enhance the model.
For more information, see Importing a Data Source (RFC/BOR Interface).
Generate the runtime objects.
For more information, see Generating the Service.
Register and maintain the service in the configured SAP Gateway hub systems.
For more information, see Service Maintenance
To proceed with the next step, see Editing Properties