Show TOC

Schema NamespaceLocate this document in the navigation structure


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 assign Schema Namespace for projects of type Service with SAP Annotations and Service with Vocabulary Based Annotations proceed as follows:

  1. Open Service Builder and right click Data Model folder of the project.

  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.

  4. Special characters (apart from '.' and '_') are not allowed. If entered, an error message is displayed.

Viewing Schema Namespace

To view the Schema Namespace, right click Data Model folder and select Details. You can see Schema Namespace populated in the field Schema Namespacein Details dialog box. This name can be modified. You can view Schema Namespace in following two approaches as well:

  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:

      Figure 1: Schema Namespace

      Here, XYZ is the schema namespace.

    2. For projects of type Service with Vocabulary Based Annotations:

      Figure 2: Schema Namespace

      Here, 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 dialog 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 dialog 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, if you have referenced a registered service you can see Registration Status green, else register the service. See, Service Maintenance.

  2. Click 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 SAP Gateway Client in mass edit view.

  5. Click Execute.

  6. Select $metadata.

  7. Annotation model file now shows annotation target with a fully qualified name (Schema namespace.Relative Path of Artifact). Refer below image:

    Figure 3: Schema Namespace

    Here, ABC is the schema namespace.