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.
Referencing a service can be done only for the projects of type Annotation Model for Referenced Service
To reference a service to annotate a model, proceed as follows:
Open SAP Gateway Service Builder.
Create a project of type Annotation Model for Referenced Service. For more information, see Creating a Service Builder Project
Right click on Data Model and select Import
Select Service Reference.
In Wizard Step 1 of 2: Service Reference , enter Technical Service Name and Version. If the metadata of the service exists in an external system, select Metadata to be fetched from an external system. This enables RFC Destination field. Enter the RFC destination of the external system to fetch the metadata.
Click Next to continue.
In The Wizard Step 2 of 2: Service Reference window, check the selection and click Finish
The selected model is referenced in the project.
The OData artifacts imported in the project are non-editable because the project is only intended to create annotations.
The Service Builder creates a new folder Model References inside the folder Data Model.
Expand this folder to see the referenced model in the project of type annotation.
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.
To proceed with next step, see Generating Annotation Provider Class.