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 ju
mp 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