In my previous blog on Annotation, I explained the process to create Annotation from service builder using Vocabulary. But this annotation is very specific to the service and you can not reuse this annotation for other services.
Standalone annotation feature of SAP Gateway enables you to create an annotation model that will be independent in nature and can be assigned to any number of relevant OData services. The advantage you are getting out of this feature is following
Service Builder tool will help you create an annotation model and assign a service to it. In principle, it is possible to assign mutiple services to an annotation model but service builder supports only one service assignment to an Annotation Model.
This blog will explain how you can create annotation model by referring an existing service and assign this Annotation model to the same referenced service using SAP NetWeaver Gateway Service Builder tool.
This feature is available from SAP Gateway IWBEP SP09.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Following are steps which you need to follow
Start the Service Builder by using the transaction SEGW.
To upload a vocabulary file into the Vocabulary Repository in the Service Builder, proceed as follows:
1. Create a New Project by clicking on
2. Select Service with Annotation Model for Referenced Service in order to create standalone annotation model.
The Service Reference option provided in the project type "Annotation Model for Referenced Service" helps you to reference a service registered in local BEP registry, so that the data model can be annotated.
3. In first screen of wizard, enter technical name and version of the service.
4. On click of 'Next' button, it will show th preview of OData elements this service is having
5. Click 'Finish' to import OData elements in Data Model.
Note: The OData artifacts imported in the project are non-editable because the project is only intended to create annotations.
3. Click on 'Save' button
It will open a dialog box with prefilled values for Annotation provider class(APC) and Annotation Model. These are editable fields and you can change the name.
NOTE: You can reference only one service via Service Builder. However, using the transaction /IWBEP/REG_VOCAN multiple services can be assigned to the annotation model, but this causes an inconsistency as the services referenced via the transaction does not reflect in Service Builder.
<</sap/opu/odata/IWFND/catalogservice;v=2/Annotations(TechnicalName='ZTEST_STANDALONE_ANNOTATION_ANNO',Version='0001')/$value>>
Note: Annotation file contains reference Uri of all the assigned services.
1. Similarly if you want to get the reference Uri of annotation file in metadata of the service, it will only be available if you create the reference in the MPC of the service, e.g.
lo_reference = vocab_anno_model->create_annotation_reference(
iv_annofile_id = 'ZTEST_STANDALONE_ANNOTATION_ANNO'
iv_annofile_version = '0001').
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
16 | |
13 | |
12 | |
11 | |
10 | |
8 | |
8 | |
7 | |
7 |