Warm tip: This article is reproduced from serverfault.com, please click

Pre-generated type-safe client libraries for S/4HANA On-premise 2020 is not available

发布于 2021-01-06 06:59:40

I am going to use pre-generated VDMs for S/4HANA On-premise system (2020) with Cloud SDK 3.35.0. I can find all the services and data models in java doc of cloud sdk for On-premise system.

The odata v2 services are located in the package com.sap.cloud.sdk.s4hana.onpremise.v2020.datamodel.odata.services. But I could not find them in Eclipse with Cloud SDK Spring archetype project. Did I miss something?

https://help.sap.com/doc/f8a1835a26b848f69536b34bf46eeb93/1.0/en-US/com/sap/cloud/sdk/s4hana/onpremise/v2020/datamodel/odata/services/package-summary.html

enter image description here

enter image description here

Questioner
Jerry Zhang
Viewed
0
Emdee 2021-01-06 18:13:30

The reason that you do not have these service classes on your classpath is that you do not have the corresponding Maven artifact on your dependency tree.

You require the Maven dependency com.sap.cloud.sdk.s4hana:s4hana-api-odata-onpremise-2020 to access theses classes.

Please note that the Maven archetype scp-cf-spring does reference by default Maven dependencies with the OData VDM for SAP S/4HANA Cloud.

When interested in using the OData VDM for SAP S/4HANA (On-Premise), the mentioned dependency must be added explicitly. This is explained in the SAP Cloud SDK documentation.