Show TOC

Schema NamespaceLocate this document in the navigation structure

This document explains you to set and modify schema namespace for the Data Model in the project created.

Schema is a collection of logical structures of data. It is identified by a Namespace through a Namespace attribute which should be unique globally. The schema's namespace is combined with the name of artifact in the data model to create unique qualified name.

Assigning Schema Namespace
To set Schema Namespace for projects of type Service with SAP Annotations and Service with Vocabulary based annotations proceed as follows:
  1. Right click Data Model folder.
  2. Select Details. Details dialogue box appears
  3. In the field Schema Namespace enter schema namespace for the project. If this field is left blank, Schema Namespace is generated and populated after runtime generation based on Technical Name of the project.
    Note Special characters (apart from '.' and '_') are not allowed. If entered, an error message is displayed.
Viewing Schema Namespace
To see the schema namespace, right click Data Model folder and select Details. You can see Schema Namespace populated in the field Schema Namespace in Details dialog box. This name can be modified. It can also be checked in the following two ways:
  1. In Runtime Artifacts:
    1. Expand Runtime Artifacts folder
    2. Right click MPC base class and select Go to ABAP Workbench.
    3. Double click Define() method to open.
  2. In metadata. Example:
    1. For projects of type Service with SAP Annotations:Schema Namespace for projects of type Service with SAP AnnotationsHere, XYZ is the schema namespace.
    2. For projects of type Service with Vocabulary based annotations:Schema Namespace for projects of type Service with Vocabulary Based AnnotationHere, Model1 is the schema namespace.
Modifying Schema Namespace
In Service with SAP Annotations and Service with Vocabulary based annotations projects Schema Namespace can be modified by opening Details dialogue box in Data Model folder and changing the name in the field Schema Namespace. After modifying Schema Namespace, save and regenerate the project. Changed name is populated in the Details dialogue box as well as in the Define() method.
Annotation Model for Referenced Service Projects
As in Annotation Model for Referenced Service Projects another service is referenced, Schema Namespace of the referenced service is populated. To see the schema namespace, generate run time and proceed as follows:
  1. Double click Service Maintenance folder to open in mass edit view. Here, you can see that the service is in registered status.
  2. Click on Maintain to open the mass edit view.
  3. Click Load Metadata. An information window displays: metadata has been loaded successfully.
  4. Now go back, and click on SAP Gateway client in mass edit view.
  5. In SAP Gateway Client Click Add URI Option
  6. Click $Metadata.
  7. Click Execute
  8. Annotation model file now shows annotation target with a fully qualified name (Schema namespace.Relative Path of Artifact). Refer below image:Schema Namespace for projects of type Annotation Model for Referenced ServiceHere, ABC is the schema namespace.