How To Create RESTful APIs And Consume Them in ABAP Development Tools

The ABAP Development Tools is built on the open Eclipse platform and offer a public API to implement or integrate your own tools. Download the Document

"Create And Consume RESTful APIs in ADT""Software Development Kit for ABAP Development Tools"Version: 1.3Date: <2026-02-03>Owner: "Thomas Alexander Ritter" >
© 2026 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material. 2 / 44Table of contentsIntroduction................................................................................................................................................................ 5Business Scenario .............................................................................................................................................................................. 5Target Group.......................................................................................................................................................................................... 5Background Information ............................................................................................................................................................... 5Prerequisites .......................................................................................................................................................................................... 6SAP ................................................................................................................................................................................................................... 6Eclipse ................................................................................................................................................................................................................... 6Implementation ................................................................................................................................................................................... 6Glossary..................................................................................................................................................................................................... 6Example ..................................................................................................................................................................................................... 7Tutorial for Creating Resources on the AS ABAP ................................................................................... 7Prerequisites .......................................................................................................................................................................................... 8Creation of the Resource Controller ................................................................................................................................... 8Creating a Resource Controller Class ................................................................................................................................................ 8Creating a Simple Transformation ........................................................................................................................................................ 9Implementing the Controller Method GET .................................................................................................................................. 10Registration of the Resource Controller ........................................................................................................................ 12Creating a Resource Application Class .......................................................................................................................................... 12Implementing a Resource Application Class ............................................................................................................................. 12Creating an Enhancement Implementation................................................................................................................................. 15Assigning Filter Values to the Enhancement Implementation ....................................................................................... 16Making the Resource Discoverable .................................................................................................................................. 16Registering the Resource Application for the Discovery ................................................................................................... 17Assigning Filter Values to the Enhancement Implementation ....................................................................................... 18Providing an Own Discovery Resource Application .............................................................................................................. 19Tutorial for Consuming REST Resources in the Eclipse Client ......................................................22Prerequisites ....................................................................................................................................................................................... 22Creation of an Eclipse Plug-in................................................................................................................................................ 22Creating the Flight Plug-in ........................................................................................................................................................................ 22Declaring the Dependencies ................................................................................................................................................................. 23Implementation of a Simple Back End Call ................................................................................................................ 23Implementing the Handler Method................................................................................................................................................... 24Deserialization of the REST Response ........................................................................................................................... 26Creating a Class for FlightData ............................................................................................................................................................. 27Creating a Content Handler .................................................................................................................................................................... 28
© 2026 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material. 3 / 44Creating a New Plug-In Fragment for Unit Tests ...................................................................................................................... 29Declaring Dependencies .......................................................................................................................................................................... 29Creating a Unit Test for the Content Handler ............................................................................................................................. 29Getting Your Test Running ....................................................................................................................................................................... 32Running the Unit Test .................................................................................................................................................................................. 40Usage of the Discovery to Get the Flight URI ............................................................................................................ 41Disclaimer ..................................................................................................................................................................43
© 2026 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material. 4 / 44Document HistoryDocument Version Description1.3 Reworking section “1.4 Prerequisites”1.2 Adding section “2.4.3.1 Prerequisites1.1 Updating section “3.4.6.1 Implementing the Serialize and Deserialize Methodand minor issues1.0 First official release of this guide
© 2026 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material. 5 / 44IntroductionBusiness ScenarioThis tutorial shows you how to implement a simple RESTful API in the ABAP back end and how toconsume it from the Java client.It follows the implementation of a resource controller for getting data from a flight resource. ThisRESTful API allows an Eclipse client to read and display existing flight data from the ApplicationServer ABAP (AS ABAP).Figure 1: RESTful API that reads existing flight data from the ABAP server and consumes it on the Eclipse clientTarget GroupDevelopers who create new Eclipse-based tools.Background InformationThis tutorial provides guidance on the following topics:General: Communication between the client and the ABAP serverABAP Server: Creating server-side resource controllers that are responsible for handling the API calls Serializing and deserializing XML data through simple transformations Creating application classes. These make it possible to call resource controllers from theclient Adding the new API to the discovery API documentEclipse Client: Creating a new Eclipse plug-in