SAP S/4HANA Cloud SDK: Version 1.8.0 is Available

The new version of the SAP S/4HANA Cloud SDK Java libraries is available since today. You can update your dependencies to version 1.8.0 and consume the new version from Maven Central.
In this blog post, we will walk you through the highlights of these releases. For a complete overview, visit our release notes for the Java libraries. The release notes also include the change log of all our releases so far.
At the end of the article, you will find a set of instructions on how to update to the new version.

Java Libraries: Release Highlights

Note: If you are using the SAP S/4HANA Cloud SDK in the Neo environment of SAP Cloud Platform, please note that there is a bug in the SDK that affects multi-tenant applications on Neo. We recommend NOT to update to version 1.8.0 in case of a multi-tenant application on Neo. Instead, wait for the next release of the SAP S/4HANA Cloud SDK, in which we plan to fix this bug. You can safely proceed to update the SDK version in Cloud Foundry applications.

As part of the SAP S/4HANA Cloud SDK, we also provide integration to popular third party frameworks on SAP Cloud Platform, for example Togglz or EclipseLink. Another example is Apache CXF; an open-source framework for developing services. With this version, we have extracted the JAX-RS specific functionality of the Apache CXF integration module into a seperate module com.sap.cloud.s4hana.frameworks:jaxrs to make it easier to leverage the corresponding functionality such as JSON message (de)serialization and error handling in applications that do not use Apache CXF.

The Javadoc of the SAP Cloud Platform abstractions (classes in packages com.sap.cloud.sdk.cloudplatform.*) has been improved to make it easier to use the corresponding functionality of the SAP S/4HANA Cloud SDK, which provides simple and transparent access to Cloud Platform features such as connectivity, security, tenants or audit logging, on both Cloud Foundry and Neo.

We have improved the contracts of methods for handling tenant, user and secret store by introducing more specific exceptions.

We have also changed names and packages of several classes – please take a close look at the compatibility notes for the full list of changes.

On some developer machines, deploying the app on the local TomEE server based on the scp-cf-tomee archetype may have failed previously with exceptions such as java.lang.NoSuchMethodError: org.apache.tomcat.util.ExceptionUtils.preload()V. We have resolved this issue by removing the tomcat-catalina lib from the TomEE Maven plugin configuration in the application/pom.xml file as generated by scp-cf-tomee archetype. Newly generated project will no longer produce this error. If you have previously generated a project using that archetype and experience the same issue, manually remove the following lines at the end of application/pom.xml: org.apache.tomcat:tomcat-catalina:7.0.82

We have also fixed several further issues as explained in the full release notes.

How to Update: Java Libraries

Note: As mentioned above, we recommend NOT to update the SDK for a multi-tenant application on Neo.

To update the version of the SAP S/4HANA Cloud SDK Java libraries used in an existing project on Cloud Foundry, proceed as follows:

* Open the pom.xml file in the root folder of your project.
* Locate the dependency management section and therein the sdk-bom dependency.
* Update the version of that dependency to 1.8.0.

With this, you are already done thanks to the “bill of material” (BOM) approach. Your dependency should look like this: com.sap.cloud.s4hana sdk-bom 1.8.0 pom import

You can now recompile your project (be aware of the compatibility notes, though) and leverage the new features of the SAP S/4HANA Cloud SDK in version 1.8.0.

Of course, you can also generate a new project that uses version 1.8.0 from the start by running the Maven archetypes for Cloud Foundry with -DarchetypeVersion=1.8.0 (or RELEASE). http://bit.ly/2BNYdsy #SAP #SAPCloud #AI

ABAP and Swagger/OpenAPI

Swagger

Swagger is a set of tools for creating, generating, documenting, and testing RESTful services.
It is centered around a specification file(https://swagger.io/specification/), which contains the description of the REST services, much like a SOAP WSDL or OData metadata file.

There are many powerful tools in the Swagger family, which all are open source:

* Editor
* UI
* Inspector

These tools are free and works in the browser. SAP also use Swagger as part of API management.

ABAP

A while ago I started building a tool for integrating ABAP and Swagger using an inside-out approach.

Lets jump right into it and see how it works, suppose I want to expose the methods of the following class as REST services: CLASS zcl_todo DEFINITION PUBLIC CREATE PUBLIC. PUBLIC SECTION. METHODS create IMPORTING is_data TYPE ztodo_data RETURNING VALUE(rs_key) TYPE ztodo_key . METHODS delete IMPORTING is_key TYPE ztodo_key . METHODS list RETURNING VALUE(rt_list) TYPE ztodo_tt . METHODS update IMPORTING iv_guid TYPE ztodo_key-guid is_data TYPE ztodo_data . ENDCLASS. CLASS ZCL_TODO IMPLEMENTATION. METHOD create. DATA: ls_todo TYPE ztodo. TRY. rs_key-guid = cl_system_uuid=>if_system_uuid_static~create_uuid_c22( ). CATCH cx_uuid_error. ASSERT 0 = 1. ENDTRY. MOVE-CORRESPONDING rs_key TO ls_todo. MOVE-CORRESPONDING is_data TO ls_todo. INSERT ztodo FROM ls_todo. ASSERT sy-subrc = 0. ENDMETHOD. METHOD delete. DELETE FROM ztodo WHERE guid = is_key-guid. ASSERT sy-subrc = 0. ENDMETHOD. METHOD list. SELECT * FROM ztodo INTO TABLE rt_list. “#EC CI_NOWHERE ENDMETHOD. METHOD update. DATA: ls_todo TYPE ztodo. ls_todo-guid = iv_guid. MOVE-CORRESPONDING is_data TO ls_todo. UPDATE ztodo FROM ls_todo. ASSERT sy-subrc = 0. ENDMETHOD. ENDCLASS.

Interface ZIF_SWAG_HANDLER must be implemented, and metadata added for the methods to be exposed, METHOD zif_swag_handler~meta. FIELD-SYMBOLS: LIKE LINE OF rt_meta. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = ‘List’(001). -url-regex = ’/list$’. -method = zcl_swag=>c_method-get. -handler = ‘LIST’. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = ‘Create’(002). -url-regex = ’/create$’. -method = zcl_swag=>c_method-post. -handler = ‘CREATE’. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = ‘Delete’(003). -url-regex = ’/delete$’. -method = zcl_swag=>c_method-post. -handler = ‘DELETE’. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = ‘Update’(004). -url-regex = ’/update/(w+)$’. APPEND ‘IV_GUID’ TO -url-group_names. -method = zcl_swag=>c_method-post. -handler = ‘UPDATE’. ENDMETHOD.

Add the handler to a custom SICF node, and thats about it! ABAP-Swagger will automatically generate a spec from the method definitions, and it is possible to use the Swagger UI to test the services. ABAP-Swagger is open source and works from 702 and up.

The full example can be found at https://github.com/larshp/todo_logic

Find more Open Source ABAP projects on dotabap.org

ABAP is like the sun, it will keep shining for a million years http://bit.ly/2F3JR9n #SAP #SAPCloud #AI

Thoughts on what’s next for the SAP Community

I originally posted this content on my own blog* over here: Thoughts on what’s next for the SAP community. I’ve since been encouraged, not least by folks managing this community like Jerry Janda, to post that content here too.

Too much? Never! As you wrote: “[W]ithout content, there is no community.” I’d love to see this blog on #SAPCommunity too. Your perspective on the video is a great read.

— Jerry Janda (Work) (@workjerryjanda) February 4, 2018

I don’t usually cross-post, but this is perhaps important enough to make an exception. So here is the post, in its brief entirety.

Thoughts on what’s next for the SAP Community

This evening I watched a short video, What’s Next for SAP Community?, with Björn Goerke, Chief Technology Officer and President of SAP Cloud Platform, and Thomas Grassl, Head of Developer Relations, laying out the vision for the SAP Community. Here are some brief Friday night thoughts.

I have been involved in building and helping the SAP community (small ‘c’) grow for a long time, from mailing lists in the 1990’s, through co-creating the original SAP Developer Network and seeing the changes through the SAP Community Network to become simply the SAP Community (see The SAP developer community 10 years ago, a post from 2005).

It’s been great to see Developer Relations and the SAP Community moving under the wing of the office of the CTO, and with the backing of CEO Bill McDermott, there’s certainly more than enough torque and momentum upon which to build.

The chassis has undergone some significant welding in recent years, but the current remodelling, while still needing some love and attention, is so much better for content creators. And without content, there is no community. I’m hopeful that the chassis and bodywork will go from strength to strength, especially with the recently announced 2018 redesigns, and we see the rebirth of interconnectivity.

What struck me most about listening to Björn and Thomas on the video just now was my perception of the sense of community being the strong, implicit anchor for the message and the vision. So I decided to transcribe the video, to perform a simple text analysis.

The transcription is here, and we can see from some simple textalyser analysis that the perception wasn’t too far off – the top five places for word frequencies in the entire piece are (with occurrences in brackets):

1: “our” (12)
2: “community” (10)
3: “sap” (6)
4: “how”, “new”, “customers” (5)
5: “need”, “think”, “help”, “content” (4)

Now it’s a short dialogue so perhaps this analysis needs to be taken with a pinch of salt, but it certainly occurs to me that the core message, and the core task, is getting people and knowledge connected.

We can do that, can’t we?

* yes, blog. Short for weblog. Often an entire website section (like this one), with a multitude of articles. Not an individual article or post. A blog is a collection of posts. Not a single post. Got that, community? http://bit.ly/2BPMEkk #SAP #SAPCloud #AI