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
To assign Schema Namespace for projects of type Service with SAP Annotations and Service with Vocabulary Based Annotations proceed as follows:
Open Service Builder and right click Data Model folder of the project.
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.
Special characters (apart from '.' and '_') are not allowed. If entered, an error message is displayed.
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:
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.
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.
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, if you have referenced a registered service you can see Registration Status green, else register the service. See, Service Maintenance.
Click Maintain to open the mass edit view.
Click Load Metadata. An information window displays: metadata has been loaded successfully.
Now go back, and click SAP Gateway Client in mass edit view.
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.