Call an External API and Parse the Response in SAP BTP ABAP Environment
Requires Customer/Partner License
Intermediate
20 min.
Call an external API SAP BTP ABAP Environment and parse the response using JSON or XML
You will learn
- How to connect to an external RESTful API, in this case the Overpass street map service: http://overpass-api.de/, by creating the necessary communication artifacts
- How to work with HTTP requests in your ABAP code
- How to query the service
- How to parse the information in an ABAP class using either JSON and SAP’s XCO Library or using XML and a simple transformation
- How to create an executable class and display the output in the ABAP console
Prerequisites
- IMPORTANT: This tutorial cannot be completed on a trial account
- You have set up SAP Cloud Platform, ABAP Environment, for example by using the relevant booster: Using a Booster to Automate the Setup of the ABAP Environment
- Tutorial: Set up SAP BTP ABAP Environment and Create Your First Console Application, for a licensed user, steps 1-2
- You have assigned the following to your business user:
SAP_BR_DEVELOPER
- You have also assigned the following to your business user:
SAP_BR_ADMINISTRATOR
(Business Role) andSAP_CORE_BC_COM
(Business Catalog) You need these to work with Communication Management in SAP Fiori Launchpad
This tutorial enables you to work with data from an external RESTful API in your ABAP applications.
Throughout this tutorial, object names include the suffix 000
. Always replace this with your group number or initials.
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.