Consume a CAP Service in SAP Build Apps
- How to import projects
- How to create a data resource from a destination
- How to check BTP permissions to a CAP service
- How to do CRUD operations in SAP Build Apps for a CAP service
Prerequisites
- You have created and deployed a CAP service, as described in Create a CAP Service with BAS Productivity Tools.
- You have created a destination to your CAP service, as described in Expose a CAP Service to SAP Build.
- You have installed SAP Build Apps on the same tenant to which you deployed your CAP service.
Instead of building the entire project from scratch, you will import a project with all the pages created, all the UI components added to the pages, and all the components stylized. Most bindings will also be set.
The app you will help build has 3 pages:
-
Risks: This page lists all the existing risks (with description and criticality displayed), and includes a button so you can add a new risk.
Next to each risk is a delete button, which lets you delete a risk from the CAP service.
-
Risk Details: This page shows all fields for a specific risk, plus the corresponding mitigation selected for the risk (if one exists). The page has 2 actions you can do:
-
There is an Edit button to edit the fields. The button takes you to the Manage Risks page, which is used for both adding and editing risks.
-
All the existing mitigations are displayed, and you can select one to assign it to the current risk, instead of the currently assigned mitigation.
-
-
Manage (Add/Update) Risks: This page lets you add a new risk or update an existing risk (if a risk ID is passed). If you navigate from an existing risk, all the field values for that risk are loaded, and you will be updating that risk.
IMPORTANT: Both the CAP service and the SAP HANA instance on a trial account may stop automatically each day, or more frequently. If you do not get returned data, check that they are running and restart them if necessary.











































