Skip to content

Commit d0474fb

Browse files
authored
Merge pull request #2724 from sap-tutorials/ADTVSCODE
Publish ADT VS Code
2 parents a83de8c + b26759f commit d0474fb

6 files changed

Lines changed: 217 additions & 0 deletions

File tree

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
---
2+
parser: v2
3+
auto_validation: true
4+
primary_tag: software-product>sap-btp-abap-environment
5+
tags: [ tutorial>beginner, programming-tool>abap-development, software-product>sap-btp-abap-environment]
6+
time: 30
7+
author_name: Shilpa Shankar
8+
author_profile: https://github.com/shilpashankar02
9+
---
10+
11+
# ABAP Development Tools for Visual Studio Code
12+
<!-- description --> You will learn how to set up ABAP Development Tool (ADT) in Visual Studio Code.
13+
14+
## Introduction
15+
16+
In this tutorial, you will install Visual Studio Code, install the ADT for Visual Studio Code extension, and establish a connection to your ABAP system.
17+
18+
This tutorial was written for SAP BTP ABAP Environment. However, you should also be able to use it in SAP S/4HANA Cloud Environment in the same way.
19+
Always replace `###` with your initials or group number.
20+
21+
## Prerequisites
22+
- Visual Studio Code — Download from <https://code.visualstudio.com/>
23+
- ADT for Visual Studio Code — ADT for Visual Studio Code includes the built-in ADT MCP Server. Here is the [link] (https://marketplace.visualstudio.com/items?itemName=SAPSE.adt-vscode) to download the extension
24+
- You need to have access to an SAP BTP, ABAP environment, or SAP S/4HANA Cloud, ABAP environment or SAP S/4HANA (release 2025 or higher) system.
25+
For example, you can create a free [trial user](https://developers.sap.com/tutorials/abap-environment-trial-onboarding.html) on SAP BTP, ABAP environment.
26+
- You have downloaded and installed the [latest ABAP Development Tools (ADT)] (https://tools.hana.ondemand.com/#abap) on the latest Eclipse© platform.
27+
- You have created an [ABAP Cloud Project](https://developers.sap.com/tutorials/abap-environment-create-abap-cloud-project.html).
28+
- Your system has the ABAP flight reference scenario. If your system hasn't this scenario. You can download it [here](https://github.com/SAP-samples/abap-platform-refscen-flight). The trial systems have the flight scenario included.
29+
30+
## You will learn
31+
32+
- How to set up Visual Studio Code with the ADT for Visual Studio Code extension and connect to your ABAP Cloud system
33+
34+
35+
### Install Visual Studio Code
36+
37+
Download and install Visual Studio Code on your system if you have not already done so.
38+
39+
1. Open a browser and go to <https://code.visualstudio.com/>
40+
41+
2. Download the installer for your operating system (Windows, macOS, or Linux).
42+
43+
3. Run the installer and follow the on-screen instructions.
44+
45+
4. Launch **Visual Studio Code** once installation is complete.
46+
47+
ℹ️ **Hint**: Ensure you are running a recent stable version of Visual Studio Code. Go to **Help > About** to check your version.
48+
49+
### Install the ADT for Visual Studio Code Extension
50+
51+
Install the **ABAP Development Tools (ADT)** extension for Visual Studio Code from the Visual Studio Marketplace. This extension connects Visual Studio Code to your ABAP backend and includes the built-in **ADT MCP Server** that you will use in Exercise 1. If you are accessing it from any event like 'We are Developers' the Visual Studio Code and ADT Extension will already be installed in the available machines.Changes here
52+
53+
**Install from the Visual Studio Code Marketplace**
54+
55+
1. Open **Visual Studio Code**.
56+
57+
2. Open the **Extensions** view:
58+
- Press **`Ctrl+Shift+X`** (macOS: **`Cmd+Shift+X`**), or
59+
- Click the **Extensions** icon in the Activity Bar (left edge)
60+
61+
3. In the search bar, type 'ABAP Development Tools'
62+
63+
4. Locate the **"ABAP Development Tools"** extension published by **SAP** and click **Install**.
64+
65+
5. Wait for the installation to complete.
66+
67+
**Success**: You should see "ABAP Development Tools" listed under **Installed** extensions.
68+
69+
![ADT Extension in Visual Studio Marketplace](ex0_adt_marketplace.png)
70+
71+
**Verify the installation**
72+
73+
1. Open the **Command Palette** **`Ctrl+Shift+P`** and type `ABAP`. You should see ABAP-specific commands such as:
74+
- `ABAP: New Destination...`
75+
- `ABAP: Open Object...`
76+
- `ABAP: Create New ABAP Object...`
77+
- `ABAP: Activate`
78+
79+
✅ If you see these commands, the extension is installed correctly.
80+
81+
![ADT Extension installed — ABAP commands visible in Command Palette](ex0_adt_installed.png)
82+
83+
84+
### Connect Visual Studio Code to Your ABAP System
85+
86+
Create a **destination** in Visual Studio Code to connect to your ABAP system, then add it to your workspace.
87+
88+
Choose the connection type that matches your system:
89+
- **HTTP** — SAP BTP ABAP Environment or SAP S/4HANA Cloud Public Edition
90+
- **RFC** — SAP S/4HANA on-premise or SAP S/4HANA Cloud Private Edition (requires SAP Logon configured on your machine)
91+
92+
**Option A: HTTP destination (Cloud systems)**
93+
94+
1. Open the **Command Palette** **`Ctrl+Shift+P`**.
95+
96+
2. Type `ABAP: New Destination` and select **"ABAP: New Destination..."**.
97+
98+
3. Select **HTTP** as the connection type.
99+
100+
4. Enter the **system URL** of your ABAP Cloud system. The URL format is:
101+
```
102+
https://<system-id>.abap.<region>.hana.ondemand.com
103+
```
104+
105+
5. Press **Enter**, then enter a short **ID** for this destination (e.g., `BTP_DEV`).
106+
107+
6. Press **Enter**. The connection is established.
108+
109+
```
110+
Command Palette → "ABAP: New Destination..."
111+
112+
Connection Type → HTTP
113+
114+
System URL → https://<system-id>.abap.<region>.hana.ondemand.com
115+
116+
Destination ID → BTP_DEV
117+
118+
✅ Connection established!
119+
```
120+
121+
**Option B: RFC destination (On-premise systems)**
122+
123+
>ℹ️ **Prerequisite**: Your system must be configured in **SAP Logon** (SAP GUI) with RFC connectivity before proceeding.
124+
125+
1. Open the **Command Palette** **`Ctrl+Shift+P`**.
126+
127+
2. Type `ABAP: New Destination` and select **"ABAP: New Destination..."**.
128+
129+
3. Select **RFC** as the connection type.
130+
131+
4. A list of systems from your **SAP Logon** configuration is displayed. Select your target system.
132+
133+
5. Enter your **username** and press **Enter**.
134+
135+
6. Enter the **client number** (e.g., `100`) and press **Enter**.
136+
137+
7. Enter your **login language** (e.g., `EN`) and press **Enter**.
138+
139+
8. The connection is established.
140+
141+
```
142+
Command Palette → "ABAP: New Destination..."
143+
144+
Connection Type → RFC
145+
146+
System → <SID>
147+
148+
Username → <username>
149+
150+
Client → 100
151+
152+
Language → EN
153+
154+
✅ Connection established!
155+
```
156+
157+
### Add the destination to your workspace
158+
159+
1. Open the **Command Palette** **`Ctrl+Shift+P`**.
160+
![Add Destination](destination.png)
161+
2. Type `ABAP: Add Destination as Folder` and select **"ABAP: Add Destination as Folder to the Workspace..."**.
162+
163+
3. Select your newly created destination.
164+
165+
4. For **HTTP** systems: a browser window opens — log in with your ABAP system credentials.
166+
For **RFC** systems: the connection is established immediately using your SAP Logon credentials.
167+
168+
5. After login, your system connection appears as a **folder** in the Visual Studio Code Explorer view (left sidebar).
169+
170+
6. Open Destination settings to see the details of the added system
171+
![Destination Settings](destsettings.png)
172+
173+
### Navigating your ABAP system
174+
175+
1. In the **Explorer** view, expand the folder for your system connection.
176+
![Explorer View](explorer.png)
177+
2. Navigate through the package hierarchy to find objects.
178+
179+
### Explore the Visual Studio Code User Interface for ABAP Development
180+
181+
> Get familiar with the key Visual Studio Code areas you will use throughout this tutorial.
182+
183+
**Key UI areas for ABAP development**
184+
185+
| Area | Location | Purpose |
186+
|------|----------|---------|
187+
| **Activity Bar** | Far left | Switch between Explorer, Search, Source Control, Run & Debug, Extensions |
188+
| **Explorer (Workspace)** | Left sidebar | Navigate your ABAP system hierarchy — packages, object types, objects |
189+
| **Editor** | Center | Edit ABAP source code (classes, CDS views, behavior definitions, etc.) |
190+
| **Problems Panel** | Bottom | Syntax errors and warnings |
191+
| **Terminal** | Bottom | Integrated shell |
192+
| **Status Bar** | Very bottom | Current line/column, language, connected system |
193+
194+
195+
**Essential keyboard shortcuts**
196+
197+
| Action | Windows/Linux | macOS |
198+
|--------|---------------|-------|
199+
| Command Palette | **`Ctrl+Shift+P`** | **`Cmd+Shift+P`** |
200+
| Open ABAP Object | **`Ctrl+Shift+A`** | **`Cmd+Shift+A`** |
201+
| Create ABAP Object | **`Ctrl+Shift+Alt+N`** | **`Cmd+Shift+Option+N`** |
202+
| Activate object | **`Ctrl+F3`** | **`Cmd+F3`** |
203+
| Activate all inactive | **`Ctrl+Shift+F3`** | **`Cmd+Shift+F3`** |
204+
| Save | **`Ctrl+S`** | **`Cmd+S`** |
205+
| Find/Replace | **`Ctrl+H`** | **`Cmd+H`** |
206+
| Run ABAP Unit Tests | **`Ctrl+Shift+F10`** | **`Cmd+Shift+F10`** |
207+
208+
#### Summary
209+
210+
You have successfully:
211+
- Installed Visual Studio Code
212+
- Installed the ADT for Visual Studio Code extension
213+
- Created an HTTP destination and connected Visual Studio Code to your ABAP Cloud system
214+
- Added the destination to your workspace and authenticated
215+
- Explored the key Visual Studio Code areas for ABAP development
216+
217+
### Test yourself
25.9 KB
Loading
26.8 KB
Loading
148 KB
Loading
43.5 KB
Loading
117 KB
Loading

0 commit comments

Comments
 (0)