Skip to content

Latest commit

 

History

History
345 lines (206 loc) · 8.49 KB

visual-studio-code-17efa21.md

File metadata and controls

345 lines (206 loc) · 8.49 KB

Visual Studio Code

This chapter describes how you can install and start working with Visual Studio Code (VS Code) and provides links to important step-by-step procedures.

Ensure that the minimum system requirements for installing VS Code are met. For more information, see Requirements for Visual Studio Code.

  • You must have Node.js installed. Ensure that you’re using a Long Term Supported (LTS) version of Node.js. Furthermore, the version of Node.js you install must also have the corresponding version of npm installed. See Node.js releases for details on the versions of Node.js marked as LTS, and their associated npm versions.

    Tip:

    To check the version of Node.js installed, type node -v in the terminal. Tto check the version of npm installed, type npm -v in the terminal. Ensure that the npm version and Node.js version are compatible.

    You can download Node.js here: https://nodejs.org/en/download/.

    Note:

    For macOS, several options are available to install a LTS version of Node.js, such as Homebrew and Node Version Manager (NVM).

  • The SAP Fiori application generator requires the MTA tool Node.js package (version 1.0 or higher) to be installed globally.

    At the command line, enter the following command to install MTA:

    npm install -g mta
    

To access Cloud Foundry services from SAP Business Technology Platform, download and install the latest version of Cloud Foundry Command Line Interface (CF CLI) by following the installation instructions.

Ensure that you have the following scope set in your npm configuration. Execute the following command:

npm config get @sap:registry

One of the following values should be returned:

  • https://registry.npmjs.org
  • undefined

If it is set incorrectly to @sap, open the .npmrc file in your home directory and remove this entry.

To set up VS Code, you need to perform the following steps:

  1. Download VS Code from the Visual Studio Code website.

    Note:

    To learn how to get started with VS Code, see https://code.visualstudio.com/docs/setup/setup-overview.

  2. You must have a working knowledge of VS Code.

    Using VS Code requires a working knowledge of this integrated development environment. Use the following resources to learn more about VS Code:

  3. Check if Node.js is already installed. You can check this by executing the following in the VS Code terminal. If you don't receive a version number, see above on how to install Node.js.

    node -v
    
  1. Navigate to VS Code > Extensions.

    For more information, see Install Visual Studio Code extensions.

  2. Search for SAP Fiori tools and select SAP Fiori tools - Extension Pack.

    Alternatively, you can navigate to SAP Fiori tools - Extension Pack and click Install.

  3. Click Install.

  4. Then, SAP Fiori tools will install the latest release of the following extensions:

    • Application Wizard
    • SAP Fiori Tools – Application Modeler
    • SAP Fiori tools - Guided Development
    • SAP Fiori tools - Service Modeler
    • SAP Fiori tools - XML Annotation Language Server
    • XML Toolkit

    You can also install each extension separately.

    Note:

    SAP CDS Language Support is an optional extension that can be installed for annotation LSP in CAP CDS. For more information, see CDS Editor.

For applications based on CAP, you can install the SAP CDS Language Support extension. To do so, perform the following steps:

  1. Open the SAP CDS Language Support extension in Visual Studio marketplace.
  2. Click Install to open the SAP CDS Language Support extension in VS Code.
  3. In VS Code, click Install to enable the extension.

For more information, see Add CDS Editor and CDS Editor.

UI5 Language Assistant Support is an openSource extension that can be optionally installed to perform control ID checks when flexEnabled property is set to true in the manifest.json file for either SAP Fiori elements or freestyle SAPUI5 projects. It also provides additional support for relevant filters to suggestions and text for ease of use.

To install the UI5 Language Assistant Support extension, perform the following steps:

  1. Open the UI5 Language Assistant extension in Visual Studio marketplace.
  2. Click Install to open the UI5 Language Assistant extension in VS Code.
  3. In VS Code, click Install to enable the extension.

The following table lists supported authentication types for SAP Fiori tools running in VS Code:

Authentication Type

SAP On Premise

SAP BTP, ABAP Environment

SAP BTP, Cloud Foundry

SAP S/4HANA Cloud

OAuth 2.0 (Client Credentials)

No

Yes

No

No

Basic Authentication

Yes

No

Yes

No

Reentrance Ticket

No

Yes

No

Yes

We recommend using SAP Business Application Studio because of its extensive support of different authentication types. For more information, see: 0002577263.

If applicable, disable SAML for selected OData services. Below is the list of OData services:

OData Services

Path

OData V2 catalog

/sap/opu/odata/IWFND/CATALOGSERVICE;v=2

OData V4 catalog (dev)

/sap/opu/odata4/iwfnd/config/default/iwfnd/catalog/0001

OData V4 catalog (prod)

/sap/opu/odata4/iwfnd/config/default/iwfnd/catalog/0002

ATO Catalog

/sap/bc/adt/ato/settings

SAPUI5 repository service (for deploy & undeploy)

/sap/opu/odata/UI5/ABAP_REPOSITORY_SRV