Technical Articles
SAP Cloud Platform SDK for service development: Overview of Blogs
Java developers using the SAP Cloud Platform SDK for service development are enabled to easily create OData services.
That is:
Create a standard Java web application
Expose data as RESTful service based on OData
Deploy and run the application on SAP Cloud Platform
SAP Cloud Platform SDK for service development offers capabilities to make life easier for achieving these tasks.
For more info about the SDK, refer to the introduction.
This blog is meant to give an overview of published tutorials and other learning assets.
Everything you need for learning how to use the SAP Cloud Platform SDK for service development can be found while following below links.
Please stay tuned for upcoming development and learning resources.
Note:
In the meantime, the Application Programming Model for SAP Cloud Platform has been released and going forward, we recommend that you develop your business applications based on it.
Nevertheless, this series of blogs is not obsolete or replaced, because the SDK for service development is part of the application programming model (see the green box with label “Service SDKs”).
Means that all the code samples provided in this blog series, can be used while developing projects based on the application programming model. That’s the case when it comes to “Implement Custom Handlers” in such a project.
Furthermore, it will be still possible to continue creating standalone project like described in this series of blogs.
General Blogs
https://blogs.sap.com/2017/10/17/introducing-the-sap-cloud-platform-sdk-for-service-development/
Series of Blogs for beginners
This series of blogs aims to help first-time users to get started with developing OData services using the SAP Cloud Platform SDK for service development.
The code samples are kept simple and easy to understand such that they allow for focusing on few aspects.
SAP Cloud Platform SDK for service development: Create OData Service [1.1] easy, fast, unexplained
SAP Cloud Platform SDK for service development: Create OData Service [1.2] easy, slow, explained
SAP Cloud Platform SDK for service development: Create OData Service [2] QUERY, READ, SQO
SAP Cloud Platform SDK for service development: Create OData Service [3] CREATE, UPDATE, DELETE
SAP Cloud Platform SDK for service development: Create OData Service [4] Complex Type
SAP Cloud Platform SDK for service development: Create OData Service [5] Property Facets
SAP Cloud Platform SDK for service development: Create OData Service [6] Navigation
SAP Cloud Platform SDK for service development: Create OData Service [8] more about UPDATE
SAP Cloud Platform SDK for service development: Create OData Service [9] UPSERT
SAP Cloud Platform SDK for service development: Create OData Service [10] Map, EntityData, POJO
SAP Cloud Platform SDK for service development: Create OData Service [11] skip + orderby
SAP Cloud Platform SDK for service development: Create OData Service [13] Data Source OData V2
…. and more coming sooner or later:
SAP Cloud Platform SDK for service development: Create OData Service […] Data Source OData V2 deleating
… and much more coming much later…
SAP Cloud Platform SDK for service development: Create OData Service […] consuming data sources
…
Related to the blog series:
SAP Cloud Platform SDK for service development: Create OData Service [0.1] Prerequisites
SAP Cloud Platform SDK for service development: Create OData Service[1.11] Prerequisites Cloud
SAP Cloud Platform SDK for service development: Create OData Service [0.2] Project creation
SAP Cloud Platform SDK for service development: Create OData Service [0.3] Tips’n’Tips
More Tutorials
SAP S/4HANA Cloud SDK: overview and links to great amount of tutorials
SAP Help
The documentation and reference for the SDK is part of the
Application Programming Model for SAP Cloud Platform
Other Links
OData: http://www.odata.org
The OData V4 documents:
Part 1: Protocol
Part 2: URL Conventions
Part 3: Common Schema Definition Language
And now:
Hi Carlos,
I went through this series of blog and wanted to say: Thank You!
I was looking for a solution to implement an OData service based on an existing edmx (which I already had from prototyping). So, instead of creating the edmx by java-code, I was able to simple reuse the existing edmx and just implement the service-methods using a simple annotation refering the entities! And furthermore, the xml can be extended easily instead of adjusting the code all the time.
It's a big time saver!
It was a lot of fun to read your very well written blog, especially the very detailled "slow" parts 🙂
Hope you will provide further blogs in the future.
Cheers
Oliver
Hi @oliver.merk6
Thanks for the feedback, I'm glad that it could help you, and it is also good to know your use case.
I promise that there will be more blogs in near future 😉
Cheers,
Carlos
Hello Carlos,
I found that Apache Olingo (https://olingo.apache.org/) can expose data as RESTful service based on OData.
What are the differences between this SDK and Apache Olingo?
Regards,
Tri
Hello Tri,
thanks for raising this question.
Actually, the SDK is a framework which attempts to hide the complexity of Olingo.
Olingo is a library, it enables OData service creation. You can use it, but there's quite some effort to do, before you have your first service running.
The SDK uses Olingo internally.
Here's a diagram
Kind Regards,
Carlos
Hi Carlos,
Thanks for the Great Blogs. I been struggling with this one issue, and really hope you can give me some hint(s) to resolve this issue.
ISSUE: Service response does not contain a Count element?
Query from my SAPUI5 App:
Result:
Code in my Service Class:
I’m not sure what else I need in my code to return the count. Any help would me much appreciated.
Thanks,
Rob
Hi @rob.gauthier sorry for the late Reply - I wasn't notified.
I've tried it with several v2-services and it worked for me.
I mean, after the call to the backend, the result.getInlineCount() returns a value.
Or, is the question different? Do you want to have inlinecount in the Response of your v4-service?
The Count is supported by the FWK, you don't Need to do anything.
When you call your v4 Service, then you can add ?$count= true
If you're exposing a v2 Service with the SDK, then inlinecount is probably not supported, see here
If you use the application programming model for Business applications , then it should work, but probably only for the CDS based data
Hope this helps,
Cheers ,
Carlos
Hi Carlos,
(I’m so glad that you are looking at this, as we are still stuck at this roadbloc)
Here is some clarification:
count = result.getInlineCount();
Our Question is: How do we pass this count in the Response? We were thinking that there must be a way to do this within following line, but no luck. (Whats happening is that some SAPUI5 elements are requesting inlinecount, and they seem to go into infinite loop calling this oData Service if count is not returned!)
queryResponse = QueryResponse.setSuccess().setData(v2ProductList).response();
Your help is much appreciated.
Thanks,
Rob.