Skip to Content
Product Information
Author's profile photo Artem Kovalov

New Versions of SAP Cloud SDK: 3.26.0 for Java, 1.26.1 for JavaScript and v40 for Pipeline

The new version of SAP Cloud SDK is here! All 3 major SDK components received significant updates. In this post, we’ll guide you through key improvements, highlights, and updates path. Feel free to jump directly to the respective component’s section:

Cloud SDK for Java 3.26.0

 

Quick links

Brand new and significantly improved OData v2 client

After delivering a state of the art OData v4 client implementation in the second quarter of 2020 we decided to port our OData v2 client to it as well. With the current release, we roll out a Beta version of the OData v2 client sharing the code base of robust and well tested OData v4 client.

Why is it important and what advantages does it bring? First of all, the client will become faster because of avoiding redundant metadata calls produced by the first OData v2 implementation build on top of the SDK for service development. Furthermore, such migration significantly speeds up the innovation cycle and unlocks advanced feature development for both OData protocol versions.

All you have to do to try a new client is replacing the method execute() with a new executeRequest().

// Creating a BusinessPartner Entity
service.createBusinessPartner(partner).executeRequest(destination);

To get you created or modified Entity back you can call getModifiedEntity().

final BusinessPartner partner = service.createBusinessPartner(partner)
                                       .executeRequest(destination)
                                       .getModifiedEntity();

 

Updated Data Model for SAP S/4 HANA Cloud

This release comes with an update of the OData v2 and v4 type-safe client libraries, also known as VDM, to the newest release 2008 of SAP S/4HANA Cloud. We support all OData services listed in the SAP API Business Hub for SAP S/4HANA Cloud. For more details on what’s changed refer to the release notes.

How to update?

Navigate to a root folder of your project and find a pom.xml file. Bump the version of com.sap.cloud.sdk dependency to 3.26.0 similar to the XML code snippet below and you’re done! Mind, because of Maven Central relying on CDN it takes a bit of time for new maven module to be distributed.

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.sap.cloud.sdk</groupId>
            <artifactId>sdk-bom</artifactId>
            <version>3.26.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
    <!-- possibly further managed dependencies ... -->
</dependencyManagement>

If for some reason your IDE hasn’t fetched updated dependency version, run mvn clean install from the command line in the root directory of your project.

Cloud SDK for JavaScript

 

Quick links

Experimental OData v4 client gets new features released

With the latest release, we provided support for collections in complex types. Check the code snippet below on how to use it.

TestEntity.builder()
         .complexTypeProperty({ stringProperty: stringProp1 })
         .complexTypeCollectionProperty([
           { stringProperty: stringProp1 },
           { stringProperty: stringProp2 }
         ])
         .build()

Another valuable addition is support for unbound actions.

  • without parameters and return type, it will look like this:
testActionImportNoParameterNoReturnType({}).execute(
  destination
);
where testActionImportNoParameterNoReturnType is generated as the an action's import name
  • with parameters and return type the code looks like the following:
testActionImportMultipleParameterComplexReturnType(
{ stringParam: 'LaLa', nonNullableStringParam: 'LuLu' }
).execute(destination);
where testActionImportMultipleParameterComplexReturnType is generated.

 

How to update?

To update the version of the SAP Cloud SDK for JavaScript 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.

Additionally, you can consult NPM for more information on version history and update path.

Cloud SDK for JavaScript type-safe client libraries for S/4HANA Cloud 1.20.0

 

Quick links

Release highlights

The pre-generated OData type-safe client is now shipped separately from the core modules of the Cloud SDK for JavaScript which is Open Source.

The release cycle and versions have also diverged as the OData type-safe client libraries are now released together with a new S/4HANA version or if some fixes are required which happens on average every 3 months, while core SDK components are usually released bi-weekly.

This release comes with an update of the OData v2 type-safe client libraries, also known as VDM, to the newest release 2008 of SAP S/4HANA Cloud. We support all OData services listed in the SAP API Business Hub for SAP S/4HANA Cloud except OData v4 services as our client for them is still experimental. For more details on what’s changed refer to the release notes.

How to update?

To update the version of the client libraries for SAP Cloud SDK for JavaScript 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.

Additionally, you can consult NPM for more information on version history and update path.

Cloud SDK for Continuous Delivery

Quick links

Beta version of Synopsys Detect Scan (formerly BlackDuck)

We introduced a new 3rd party stage which allows executing Detect scans using the project “Piper” step detectExecuteScan. This is an early version of the step, it might not support all variants of projects out-of-the-box.
You might also need to configure a Docker image that provides the build tools, e.g. maven, that you want to use during the scan.

Activate the scan by configuring the following step detectExecuteScan, for example:

steps:
  detectExecuteScan:
    detectTokenCredentialsId: 'detect-token'
    projectName: 'My Example'
    projectVersion: '1'
    serverUrl: 'https://xyz.blackducksoftware.com'
    dockerImage: 'docker-image'

How to update?

If you are using the pipeline with a fixed version (as recommended since v7), update the continuous delivery toolkit with the following command, that you run on the server hosting the cx-server:

./cx-server update image

Feedback

We hope you enjoy developing with SAP Cloud SDK! To help us further improve give your ideas and suggestions in the comments to this blog or send them to cloudsdk@sap.com.

All the best,

SAP Cloud SDK Team

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Naga Prakash
      Naga Prakash
      I think we need run "mvn clean install" after the updating pom.xml file.
      Thanks,
      Naga
      Author's profile photo Artem Kovalov
      Artem Kovalov
      Blog Post Author

      Good catch, Naga Prakash, usually your IDE like IntelliJ IDEA or VSCode will resolve the updated dependencies for you, but on the command line mvn clean install will do the trick. I’ll add this step for clarity.

      Thanks for the feedback.

      Author's profile photo Naga Prakash
      Naga Prakash

      Hi Arem Kovalov,

      I created a spring boot application with maven archtype from and its still pointing to 3.25 version.

      https://sap.github.io/cloud-sdk/docs/java/getting-started/

      Any settings to be done?

       

      Thanks,

      Naga

      Author's profile photo Artem Kovalov
      Artem Kovalov
      Blog Post Author

      Hi Naga Prakash ,

      Have you tried just now? It happens sometimes because it takes a bit of time for Maven Central to update all of its CDNs which might lead to an older version being fetched.

      I already see the latest version available: https://search.maven.org/search?q=g:com.sap.cloud.sdk

      Otherwise, you’re doing things right. Can you give it another try? I’ll also try to make sure everything works as expected and get back to you.

      Thanks for the patience and for giving it a try!

      Best,

      Artem