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:
- Right click Data Model folder.
- Select Details. Details dialogue box
appears
- 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:
- In Runtime Artifacts:
- Expand Runtime Artifacts folder
- Right click MPC base class and select Go to ABAP
Workbench.
- Double click Define() method to open.
- In metadata. Example:
- For projects of type Service with SAP
Annotations:Here, XYZ is the schema namespace.
- For projects of type Service with Vocabulary based
annotations: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 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:
- Double click Service Maintenance folder to open in mass
edit view. Here, you can see that the service is in registered status.
- Click on Maintain to open the mass edit view.
- Click Load Metadata. An information window displays:
metadata has been loaded successfully.
- Now go back, and click on SAP Gateway client in mass edit view.
- In SAP Gateway Client Click Add URI Option
- Click $Metadata.
- Click Execute
- Annotation model file now shows annotation target with a fully qualified name
(Schema namespace.Relative Path of Artifact). Refer
below image:Here, ABC is the schema namespace.