---
author_name: Thomas Jentsch
author_profile: https://github.com/tj-66
keywords: tutorial
auto_validation: true
time: 5
tags: [ tutorial>intermediate, software-product>sap-business-technology-platform]
primary_tag: software-product>sap-build-process-automation
parser: v2
slug: spa-consume-actions-cap-setupenv
canonical_url: https://developers.sap.com/tutorials/spa-consume-actions-cap-setupenv
---

# Setup Connectivity to CAP Service
<!-- description --> Create a BTP destination and add the destination to SAP Build Process Automation to access the CAP Service.

## You will learn
  - How to create destination in SAP BTP Cockpit to connect to CAP service
  - How to add the destination to SAP Build Process Automation
  
## Prerequisites
- Access to a [SAP BTP tenant with SAP Build Process Automation](spa-subscribe-booster)

---
### Create Destination in SAP BTP Cockpit

In the SAP BTP Cockpit, you will create a destination that will be used in the Action Editor to test the Action and later also in the Process execution.

1. Open the **BTP Cockpit**

2. Get the Application Routes URL from the service which is running in your Cloud Foundry space, click on the Name

    ![service name](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-consume-actions-cap-setupenv/ServiceStarted.png)

3. Copy the URL into the clipboard to use it in the Destination definition (next item)

    ![service route](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-consume-actions-cap-setupenv/ApplicationRoute-1.png)

4. Navigate back to your Subaccount - Overview

    ![overview](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-consume-actions-cap-setupenv/SubaccountOverview.png)

5. Click **Destinations** to show the available Destinations

     - Click **Create Destination** 
  
     - enter **URL** **`<Application Routes url>/api/v1`** (paste Routes URL from the clipboard)

     - enter **Name** **`Demo_CAP_Sample_Library`**
  
     - enter **Additional properties** **`sap.applicationdevelopment.actions.enabled`** **`true`**

     - enter **Additional properties** **`sap.processautomation.enabled `** **`true`**

     - click **Save**

    ![new destination](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-consume-actions-cap-setupenv/CAPDestination-1.png)


### Add Destination in SAP Build Process Automation

1. Open **SAP Build Process Automation**

2. Click **Control Tower**

     - Select **Destinations** 

     - Choose **New Destination** 

     - From the popup, select **`Demo_CAP_Sample_Library`**

     - Click **Add** 

    ![add destination](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-consume-actions-cap-setupenv/AddDestination.png)


    Destination is added to the list and can be used in SAP Build Process Automation.

    ![destinations](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-consume-actions-cap-setupenv/Destinations.png)
    

### Test yourself
