Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...