The ability to add services is only supported for the SAP Fiori elements Overview Page and freestyle SAPUI5 projects.
-
Right-click the application project
manifest.json
. -
In the context menu, select Service Manager.
-
Click Add Service.
-
Choose Connection Type:
- Destination (SAP Business Application Studio) - Select the server destination from the dropdown. Enter your username and password if needed.
- SAP System (Visual Studio Code) - Select the server SAP System from the dropdown. Enter your username and password if needed.
- Hostname - Enter the server hostname, SAP Client, and username and password if needed.
-
To specify the OData service URL:
- Enter Service URL manually.
- Fetch Services from the server catalog and select from the dropdown list.
-
Click Add.
A new service appears in a service list. A service
metadata.xml
is now added to a local service folder of the project along with the service back-end annotations (if they’re available).
-
Right-click the SAP Fiori elements application project
manifest.json
. -
In the context menu, select Service Manager.
-
Click the ✏️ (Pencil) icon opposite the service.
-
Choose Connection Type:
- Destination (SAP Business Application Studio) - Select the server destination from the dropdown. Enter your username and password if needed.
- SAP System (Visual Studio Code) - Select the server SAP System from the dropdown. Enter your username and password if needed.
- Hostname - Enter the server hostname, SAP Client, and username and password if needed.
-
Click
- Refresh - Refresh the local copy of service metadata and annotation files.
- Refresh & Save - Refresh the local copy of service metadata and annotation files and save connection to UI5
YAML
files.
- Right-click the SAP Fiori elements application project
manifest.json
. - In the context menu, select Service Manager.
- Click the:wastebasket: (Delete) icon.
The metadata.xml
, related annotation XML files and mockdata is deleted from the project. Also, the ui5*.yaml
files will remove any back-end routing and mockserver entries specific to the service being deleted.
For more information about mockserver, see Use Mock Data.
The OData services can have multiple local annotation files associated with a service. The Annotation File Manager can be used to manage local annotation files associated with a service.
Managing annotations is limited to the OData service and not applicable to CAP CDS.
How to open the Annotation File Manager
- Right-click the
manifest.json
file in the SAP Fiori elements application project. - In the context menu, select Annotation File Manager.
- Select the target service from the drop-down list.
Alternatively, you can click Annotation Hierarchy in the Annotation List View for a particular projection or property of service.
- Right-click the
manifest.json
file in the SAP Fiori elements application project. - In the context menu, select Annotation File Manager.
- Select the target service from the drop-down list.
- Click Create Local Annotation File.
- Fill in the criteria required for creating an annotation file.
- Click Create.
The newly created annotation file appears in the Annotation File Manager for that service, and also in the Annotation List View for the target projection.
The highest-ranked annotation file in the Annotation File Manager table is at the bottom resembling precedence rules in the
manifest.json
.
- In the Annotation File Hierarchy, use the up/down arrows to change the hierarchy.
-
Right-click the
manifest.json
file and select Open Annotation File Manager. -
Select or clear the checkbox in the active column of the Annotation File Manager table to activate or deactivate the annotation.
When a file is deactivated, it’s no longer considered a part of the annotation file hierarchy.
- Select the active checkbox.
- Click the 🗑️ (Delete) icon next to the annotation file.