Send Multiple OData Requests in Batch Mode with SAP Cloud SDK's Virtual Data Model
February 7, 2021
Advanced
20 min.
Build and execute OData batch requests for writing and retrieving data with the SAP Cloud SDK's Virtual Data Model in your Address Manager application.
You will learn
- How to combine multiple write requests like requests to create, update and delete into changesets
- How to combine read requests and changesets into batch requests and execute them
- How to handle the response of a batch request using the SAP Cloud SDK and it’s Virtual Data Model
Prerequisites
- Have
Node.js
andnpm
installed on your machine. - Have access to an SAP S/4HANA Cloud system or the SAP API Business Hub Sandbox, or use the Business Partner Mock Service.
- Recommended to explore the more basic CRUD operations by going through these tutorials, but not required.
- Basic knowledge of OData is recommended, but not required.
The goal of this tutorial is to create and execute OData Batch requests using the SAP Cloud SDK. It is recommended to go through the previous tutorials on the SAP Cloud SDK’s Virtual Data Model as you will extend the TypeScript / JavaScript address manager application that was built there.
Step 1: What is an OData batch request?
Step 2: Prepare your application
Step 3: Create a batch request with a changeset
Step 4: Convert the changeset response to a list of entities
Step 5: Retrieve an address list in batch mode
Step 6: Try out your batch API
Step 7: Test yourself
Navigate tutorial steps