Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
The new version of the SAP S/4HANA Cloud SDK Java libraries is available since today. You can update your dependencies to version 2.10.0 and consume the new version from Maven Central.
In this blog post, we will walk you through the highlights of this release. For a complete overview, visit our release notes for the Java libraries. 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 version.

Java Libraries: Release Highlights

Handling of new API versions

The Java virtual data model for accessing SAP S/4HANA Cloud APIs now supports both versions of the Bill of Materials API. In the latest release 1811 of SAP S/4HANA Cloud, a new version 2 of this API was introduced with incompatible changes, while the old version remains available as well. At that time, the SDK replaced the previously existing VDM with the classes that represent the new service version. With version 2.10.0 of the SDK, we re-introduce the VDM representation for the old version in addition to the new version. To this end, the service class and package for the new API version 2 have been renamed. The newer version 2 is available as BillOfMaterialsV2Service. The previous version 1 is available as BillOfMaterialsService.
In the future, we will represent new versions of APIs from the beginning in a similar manner. That is, subsequent new versions (with incompatible changes) will be represented as new VDM services (suffixed with the version number). As before, compatible changes to existing APIs that are no new version in the SAP API Business Hub will simply be reflected by corresponding compatible changes to the Java representations in the VDM.

Further improvements

The Cloud Platform user abstractions now return String-typed user attributes as instances of StringUserAttribute instead of SimpleUserAttribute<String> on SAP Cloud Platform Neo, and as StringCollectionUserAttribute instead of CollectionUserAttribute<String> on Cloud Foundry to allow more convenient consumption.

We have enhanced the ForEachSystemRule utility for integration tests to support the notion of fallback systems. These are systems for which the tests are executed (in-order) after the test failed with the first configured system. A test is considered successful if it succeeds with at least one of the specified systems.

Version 2.10.0 fixes an issue with projects created by the scp-cf-tomee archetype where TomEE would not start because of a conflict with the default shutdown port 8005 on Windows. Now, shutdown port 8006 is explicitly specified in application/pom.xml.

This version also fixes an issue with projects generated by the scp-cf-tomcat archetype where integration tests failed when run from an IDE because of a missing port configuration for arquillian. Now, a default port 9090 is defined in arquillian.xml which takes effect unless a system property arquillian.httpPort is passed to the test runner. Please note that in IntelliJ you still need to disable passing systemPropertyVariables to JUnit in File | Settings | Build, Execution, Deployment | Build Tools | Maven | Running Tests or pass -Darquillian.httpPort=9090 manually.

We have fixed an issue where the XSUAA service instance credentials could not be found for a given JWT when using multiple XSUAA instances along with the broker plan of XSUAA.

Several further improvements are listed in the full release notes.

How to Update

Java libraries

To update the version of the SAP S/4HANA 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 2.10.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 ... -->

You can now recompile your project (be aware of the compatibility notes, though) and leverage the new features of the SAP S/4HANA Cloud SDK in version 2.10.0.

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