Showing posts with label IDE. Show all posts
Showing posts with label IDE. Show all posts

Sunday, December 11, 2022

Code ABAP in MS Visual Studio Code

Microsoft Visual Studio Code (Code) is popular programmer’s IDE these days. First, it is a free, open source, cross-platform code editor. It includes support for debugging, syntax highlighting, IntelliSense code completion, and embedded Git. The Code also includes built-in tools for web development such as IntelliSense, code snippets, and refactoring. It can be used for both small and large projects, and is a great choice for developers who want to quickly create applications without having to learn a complex language. It is a lightweight code editor that can be used to write, debug, and test code across many different programming languages, including JavaScript, CSS, Node.js, and HTML.

Wait a bit, what about ABAP? Can I use the VS Code to code in the ABAP? It turns out yes you can! It is possible due to “ABAP remote filesystem for visual studio code” (ABAP FS) plugin to the Code written by Marcello Urbani. Let us have a look how to install this extension to develop in ABAP in MS Visual Studio Code.

Install the Code (e.g. from here). I choose a version for MS Windows OS. Notice that you can even installed in MS Windows machines where you do not have an administrator rights granted. Once it is installed open the extension part of it from left side. Here type ABAP remote filesystem for visual studio code to search for this plug. Once it is found click on little blue Install button to get it installed.

There are few more plugins to be installed as they are dependencies to the ABAP one. Thus also install following ones:

·        ABAP by Lars Hvam

·        ABAP CDS language Support by Frederik Hudak

·        Winregistry by Marcello Urbani

Another requirement is to have installed ABAP Development tools for eclipse (ADT) installed in SAP HANA Studio on a machine where you installed the MS Code. You can install the ADT from here https://tools.hana.ondemand.com/#abap.

One more prerequisite is to enable ADT specific service at SAP ABAP server. Once you log in there via SAP GUI run SICF t-code. Navigate to the service: default_host -> sap -> bc -> adt. If the service is not active just activate it via right click: Activate service.

Now you need to setup the ABAP plugin in the Code. In the Code, navigate to ABAP FS extension and click on little Manage icon and then choose Extension Settings


Here choose Edit in settings.json.


In the JSON file, provide an input into following fields:

·        SID of ABAP NetWeaver system (3 characters abbreviations)

·        url of ABAP NetWeaver system

·        username in the ABAP NetWeaver system

·        password of above user

·        client of ABAP NetWeaver system

Once this is done press F1 and enter following command:

ABAPfs Connect to an ABAP system

Afterwards, there should be a new icon appearing in left part of yoru CODE IDE called ABAP FS. 


Now you can go to Explorer part of the Code and here you can access ABAP repository objects e.g. under $TMP development class that belong to yoru user. From here, you just click on the ABAP object e.g. program and it gets opened in the Editor.


I faced following issues while setting the plugin up:

·        No ABAP filesystem mounted in current workspace – I forgot to update url part of configuration JSON file for the plugin.

·        Unable to get local issuer certificate - I forgot to put SID of my ABAP system in configuration JSON file for the plugin.

  

More information:

MS Visual Studio Code download page

Plugin wiki

Plugin issues

Plugin installation

Tuesday, November 23, 2021

Where to download SAP HANA Studio?

Most of SAP HANA development artefacts including SAP HANA administration is being done in a tool called SAP HANA Studio. The tool is based on Eclipse foundation. The easiest way to get the tool is just to download the latest Eclipse IDE (at the time of writing it is version 2021-09). Afterwards an SAP specific plug-ins needs to be installed via menu Help->Install Software) from:

https://tools.hana.ondemand.com/#abap for ABAP Development Tools

https://tools.hana.ondemand.com/#bw for BW Modelling Tools

https://tools.hana.ondemand.com/#cloud for Cloud development like SAP BTP

https://tools.hana.ondemand.com/#cloudintegration for Cloud Integration

https://tools.hana.ondemand.com/#hanatools for HANA related development

etc..

or simply: https://tools.hana.ondemand.com/latest

However, SAP offers all this and much more included in one distribution of SAP HANA Studio. At the time of writing, there is a version 2.3.32.000000 available via Note 2902153. Physically the installation media is distributed via SAP Support Portal its Download section. Here you need to navigate to SUPPORT PACKAGES & PATCHES -> By Alphabetical Index (A-Z) -> select S -> e.g. SAP HANA STUDIO 2 (SUPPORT PACKAGES AND PATCHES)

The installation file can be either downloaded directly or via SAP Download Manager. The file itself is quite heavy, approximately 1.2GB. It comes as SAR file and it needs to be unpacked by SAPCAR tool.

There are following main 3 parts that can be installed:

SAP HANA Studio Administration

SAP HANA Studio Application

SAP HANA Studio Database Development





After the installation, the software occupies approximately 1.2GB (1.5GM with all the SAP plug-ins) on hard drive. For ABAP BW, BPT and cloud development SAP plugins need to be installed from https://tools.hana.ondemand.com/latest again via menu Help->Install Software.


In case you run into issues like below while installing the SAP plugins into the Studio:

An error occurred while uninstalling session context was:(profile=hdbstudio, phase=org.eclipse.equinox.internal.p2.engine.phases.Uninstall, operand=[R]com.sap.ide.support.feature_root.win32.win32.x86_64 1.15.0 --> null, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction). Backup of file C:\Program Files\SAP\hdbstudio\collectSupportInformation.bat failed. hdbstudio\collectSupportInformation.bat

Then it is most likely that you need to run your Studio as administrator and repeat installation of the SAP plug-ins.

In most cases just to download the IDE from eclipse and install the plugin is efficient. However if you prefer to have the full blown SAP HANA Studio you can get it as described in this blog post.