Skip to Content
Product Information
Author's profile photo Henning Heitkoetter

New Versions of SAP Cloud SDK: 3.1.0 for Java and 1.8.0 for JavaScript

We have released new versions of the SAP Cloud SDK. In detail, the following components are now available in new versions:

In this blog post, we will walk you through the highlights of these releases. For a complete overview, visit our release notes for the Java libraries, for the JavaScript libraries, and for the continuous delivery toolkit. The release notes also include the change log of all our releases so far.
At the end of the article, you will find a set of instructions on how to update to the new versions.

Six weeks to go until SAP TechEd 2019. Learn more about the sessions featuring the SAP Cloud SDK in our dedicated blog post.

Java Libraries: Release Highlights 3.1.0

You can update your dependencies of the SAP Cloud SDK for Java to version 3.1.0 and consume the new version from Maven Central.

Update of OData and Message VDM to SAP S/4HANA Cloud 1908

Recently, SAP released SAP S/4HANA Cloud 1908.

With version 3.1.0 (and 2.20.0), the SAP Cloud SDK updates the virtual data model (VDM) for OData services of SAP S/4HANA Cloud to support all newly released or updated OData services of an SAP S/4HANA Cloud 1908 system. As explained in the blog post about the VDM itself, the VDM greatly simplifies reading and writing data from an SAP S/4HANA system in your Java code.

You can use the SDK to connect to all OData services listed in the SAP API Business Hub for SAP S/4HANA Cloud. As usual, the Java representations of all OData services are available from the package

We have also updated the message virtual data model (VDM) that allows to consume messages from SAP S/4HANA Cloud in a type-safe manner.
This update includes 21 new message types to reflect the new event types added in SAP S/4HANA Cloud. With this, we continue to support all business event types of SAP S/4HANA Cloud. The Java representations for these are available from package

Further improvements

Version 3.1.0 updates the dependency to Jackson Databind to version (from in order to fix reported security vulnerabilities.

We have also fixed an issue where a DefaultHttpDestination in 3.0.0 failed to load the authentication type, so that authentication was not correctly applied when loading destinations from environment variable or instantiating DefaultHttpDestination manually.

Several further improvements are listed in the full release notes.

Java Libraries: Release Highlights 2.20.0

We have also released the SDK for Java in a new maintenance version 2.20.0. Everyone who did not yet migrate to version 3 of the SDK for Java can consume that version from Maven Central.

We have updated the OData and Message VDM in version 2.20.0 like we did for version 3.1.0.

For a complete view on what has changed, take a look at the full release notes.

JavaScript Libraries: Release Highlights 1.8.0

The JavaScript libraries of the SAP Cloud SDK are now available in version 1.8.0.

Update of JavaScript VDM to SAP S/4HANA Cloud 1908

Like in the SDK for Java (see above), the OData VDM for easily accessing OData services with the SDK for JavaScript has also been updated to the recently released version SAP S/4HANA Cloud 1908. You can find the modules representing the latest state of SAP S/4HANA Cloud APIs as modules named @sap/cloud-sdk-vdm-* in the global list of SDK modules.

Create New OData Entity as Child of Another Entity

The OData client for JavaScript makes it easy, besides other features, to create new entities via OData requests. Some OData services may require that you create an entity as a child of another entity via a navigation property of the parent entity. In other cases, it may be more natural to create an entity by addressing the naviation property of a parent entity, for example, when adding an address to an existing business partner.

The OData client now allows creating an OData entity as the child of another entity. To leverage this feature, use as usual the request builder of the entity to create (for example, BusinessPartnerAddress.requestBuilder().create), then use the method asChildOf on the fluent API for the create request. You need to supply the parent entity to asChildOf, as well as the navigation property of the parent entity type to specify the relationship between parent entity and the child entity to be created.

As an example, consider the following code which will create an address as a child of a business partner via the TO_BUSINESS_PARTNER_ADDRESS navigation property of the business partner:

const parentBusinessPartner = BusinessPartner.builder().businessPartner("1000000").build();
const newAddress = BusinessPartnerAddress.builder().country("DE").cityName("Potsdam").build();
    .asChildOf(parentBusinessPartner, BusinessPartner.TO_BUSINESS_PARTNER_ADDRESS)
    .execute({destinationName: "S4HANA"});

As usual, this approach is type-safe when using TypeScript thanks to the TypeScript representation of the OData service and entities. It requires that the OData service in question supports creating the child entity via the navigation property of another entity.

Further improvements

The SDK now correctly verifies access tokens (JWTs) that have been retrieved from the XSUAA service, in addition to verifying user-provided tokens as before.

As usual, the full release notes contain a list of all improvements in this release.

How to Update

Java libraries

To update the version of the SAP Cloud SDK Java libraries used in an existing project, proceed as follows:

  • Open the pom.xml file in the root folder of your project.
  • Locate the dependency management section and therein the sdk-bom dependency.
  • Update the version of that dependency to 3.1.0.

With this, you are already done thanks to the “bill of material” (BOM) approach. Your dependency should look like this:

    <!-- possibly further managed dependencies ... -->

If you update from a version prior to 3.0.0, have a look at our migration guide.

If you are using the SAP Cloud SDK in a project of the SAP Cloud Application Programming Model, replace sdk-bom with sdk-modules-bom to only update the version of SDK modules, not further dependencies.
You can now recompile your project (be aware of the compatibility notes, though) and leverage the new features of the SAP Cloud SDK in version 3.1.0.

Of course, you can also generate a new project that uses version 3.1.0 from the start by running the Maven archetypes for Neo or Cloud Foundry with -DarchetypeVersion=3.1.0 (or RELEASE).

JavaScript libraries

To update the version of the SAP Cloud SDK JavaScript libraries used in an existing project, use the command npm update in the root folder of your module. Note that this will also update other modules, unless you explicitly specify which packages to update. If you want to check beforehand what will change, use npm outdated.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.